fix: get latest key version ID from DB for system events#232
fix: get latest key version ID from DB for system events#232minh-nghia wants to merge 1 commit intomainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis change refactors the key-version information retrieval flow from plugin-based to database-based. A new helper function 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
internal/event-processor/reconciler_test.go (1)
802-810: Drive the freshness regression throughSYSTEM_KEY_ROTATE.This subtest still proves the refreshed version on
SYSTEM_SWITCH, but the reported bug is inSYSTEM_KEY_ROTATE. Since rotate has its own key-ID validation/selection path, I’d run this assertion withJobTypeSystemKeyRotateandKeyIDFrom == KeyIDToso the exact failing flow is covered end-to-end.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c81fc228-828b-46d3-9e12-b8f7175b3829
📒 Files selected for processing (3)
internal/event-processor/reconciler_test.gointernal/event-processor/repo.gointernal/event-processor/resolvers.go
957d963 to
f4072c4
Compare
f4072c4 to
a89f8c7
Compare
What this PR does / why we need it:
Event reconciler has no access to managers and its logic to derive provider config, so calling plugin's GetKey - which requires authenticating to key provider to update key metadata - is not possible.
This PR simplifies it by getting the version ID from the DB.
Summary by CodeRabbit
Refactor
Tests