Conversation
|
@ardaguclu: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughThe encryption controller clarifies ChangesEncryption key rotation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/operator/encryption/controllers/key_controller.go (1)
441-441: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd regression coverage for the new KMS return contract.
This changes the no-rotation result from
0tolatestKeyID. Add a unit test asserting that an unchanged KMS provider returns(latestKeyID, "", false, nil)so future changes do not revert the documented behavior.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/operator/encryption/controllers/key_controller.go` at line 441, Add regression coverage for the KMS no-rotation contract in the existing key-controller tests: configure an unchanged KMS provider and assert the result is (latestKeyID, "", false, nil), specifically preserving latestKeyID instead of zero.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/operator/encryption/controllers/key_controller.go`:
- Around line 371-379: The needsNewKey documentation incorrectly restricts
latestKeyID to backed keys. Update its return-value description to state that it
contains the parsed ID of the latest key, including unbacked keys, while
preserving the existing zero-value cases and return behavior used for
calculating the next key ID.
---
Nitpick comments:
In `@pkg/operator/encryption/controllers/key_controller.go`:
- Line 441: Add regression coverage for the KMS no-rotation contract in the
existing key-controller tests: configure an unchanged KMS provider and assert
the result is (latestKeyID, "", false, nil), specifically preserving latestKeyID
instead of zero.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 59915a78-7f67-45d3-ad60-bf43bf4ff176
📒 Files selected for processing (1)
pkg/operator/encryption/controllers/key_controller.go
|
@ardaguclu: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
This was a premature attempt. It is better to open these PRs, after the preflight is done. |
|
@ardaguclu: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
When new key is not needed, returned latest Key ID is not used. However, with in-place field updates, this latest Key ID will be used to update the kms provider config, unless it is 0.
This is the full implementation #2241 to demonstrate the purpose.
Summary by CodeRabbit
latestKeyID,reason,needed, anderrto make key-rotation outcomes and returned values easier to interpret.