Skip to content

revert wrong override of ReconcilerGetAllKeys#190

Merged
Prabhjot-Sethi merged 1 commit into
mainfrom
table-reconciler-keys
Jun 27, 2026
Merged

revert wrong override of ReconcilerGetAllKeys#190
Prabhjot-Sethi merged 1 commit into
mainfrom
table-reconciler-keys

Conversation

@Prabhjot-Sethi

@Prabhjot-Sethi Prabhjot-Sethi commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Improved org-unit reconciliation behavior by using the standard table key handling, which may make deleted org-unit records sync more consistently.

Signed-off-by: Prabhjot Singh Sethi <prabhjot.sethi@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 65119c73-7cf4-485d-bafa-d8260d8d791a

📥 Commits

Reviewing files that changed from the base of the PR and between 4b17d12 and f9dc046.

📒 Files selected for processing (1)
  • pkg/table/org-unit.go
💤 Files with no reviewable changes (1)
  • pkg/table/org-unit.go

Walkthrough

Removes the ReconcilerGetAllKeys override from OrgUnitTable in pkg/table/org-unit.go, along with the log and bson imports it required. Org-unit reconciliation now falls through to the embedded table.Table default implementation instead of the soft-delete-filtered logic.

Remove soft-delete reconciler override

Layer / File(s) Summary
Drop ReconcilerGetAllKeys and unused imports
pkg/table/org-unit.go
Removes the bson/log imports and the ReconcilerGetAllKeys method that previously queried for soft-deleted (deleted > 0) org-unit records and returned key-only pointers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

A method once filtered the soft-deleted heap,
Now the default takes over while bunnies sleep.
No bson, no log, no panic to fear,
The table's own logic keeps record-keeping clear.
Hop hop, less code — the warren stays neat! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the incorrect ReconcilerGetAllKeys override.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch table-reconciler-keys

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dev-arya23 dev-arya23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I verified

  • Correctness of the revert: The removed OrgUnitTable.ReconcilerGetAllKeys() override was filtering to only soft-deleted entries (deleted > 0). This meant the reconciler would only track org-units pending hard-delete, leaving all active org-units outside reconciler management — breaking normal CRUD reconciliation.

  • Fallback to generic implementation: With the override removed, OrgUnitTable now inherits Table[K, E].ReconcilerGetAllKeys() from go-core-stack/core/table/generic.go, which returns all keys via a nil filter. This is the correct behavior — the reconciler should manage the full set of entries.

  • Import cleanup: The now-unused "log" and "go.mongodb.org/mongo-driver/v2/bson" imports are correctly removed.

  • No second-order effects: No other code in this file references the removed method or the removed imports. The OrgUnitTable struct still embeds table.Table[OrgUnitKey, OrgUnitEntry], so all generic table behavior (including the correct ReconcilerGetAllKeys) is inherited cleanly.

LGTM — clean, well-scoped revert.

@Prabhjot-Sethi Prabhjot-Sethi merged commit dc351f6 into main Jun 27, 2026
1 of 3 checks passed
@Prabhjot-Sethi Prabhjot-Sethi deleted the table-reconciler-keys branch June 27, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants