kms to kms key identifier check#941
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (11)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThis PR redirects ChangesDependency and test helper updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/e2e-encryption-kms/encryption_kms_2.go (1)
43-44: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicated namespace/label-selector literals.
"openshift-config-managed"and the component label selector string at Lines 43-44 duplicate the values already set in theBasicScenarioliteral at Lines 30-31. Consider referencing local variables to avoid drift if either changes.♻️ Suggested consolidation
+ namespace := "openshift-config-managed" + labelSelector := "encryption.apiserver.operator.openshift.io/component" + "=" + "openshift-oauth-apiserver" + library.TestEncryptionProvidersMigration(ctx, t, library.ProvidersMigrationScenario{ BasicScenario: library.BasicScenario{ - Namespace: "openshift-config-managed", - LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + "openshift-oauth-apiserver", + Namespace: namespace, + LabelSelector: labelSelector, ... }, AssertResourceEncryptedFunc: func(t testing.TB, cs library.ClientSet, resource runtime.Object) { library.AssertTokenOfLifeEncrypted(t, cs, resource) - library.AssertKMSEncryptedWithWriteKey(t, cs.Kube, "openshift-config-managed", - "encryption.apiserver.operator.openshift.io/component=openshift-oauth-apiserver", + library.AssertKMSEncryptedWithWriteKey(t, cs.Kube, namespace, labelSelector, []byte(library.GetRawTokenOfLife(t, cs)), library.AuthTargetGRs[0], ) },🤖 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 `@test/e2e-encryption-kms/encryption_kms_2.go` around lines 43 - 44, The namespace and label-selector literals in the KMS encryption assertion are duplicated from the BasicScenario setup, so update the call in the encryption_kms_2 test to reuse the existing local values instead of hardcoding them. Use the BasicScenario fields/variables already initialized in this test to keep the namespace and component selector in sync with the scenario configuration.
🤖 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.
Nitpick comments:
In `@test/e2e-encryption-kms/encryption_kms_2.go`:
- Around line 43-44: The namespace and label-selector literals in the KMS
encryption assertion are duplicated from the BasicScenario setup, so update the
call in the encryption_kms_2 test to reuse the existing local values instead of
hardcoding them. Use the BasicScenario fields/variables already initialized in
this test to keep the namespace and component selector in sync with the scenario
configuration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e6f33694-055f-4a92-935d-9b53742d6eb9
⛔ Files ignored due to path filters (11)
go.sumis excluded by!**/*.sumvendor/github.com/openshift/library-go/pkg/operator/encryption/controllers/kms_preflight_controller.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/assets/kms-preflight-pod.yamlis excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/checker.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/cmd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/deployer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/pod_status.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/pkg/operator/encryption/kms/preflight/pod_template.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/test/library/encryption/assertion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/openshift/library-go/test/library/encryption/scenarios.gois excluded by!**/vendor/**,!vendor/**vendor/modules.txtis excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (4)
Untitledgo.modtest/e2e-encryption-kms/encryption_kms_2.gotest/library/waits.go
|
@gangwgr: The following tests failed, say
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. |
|
PR needs rebase. 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. |
kms to kms key identifier check
Summary by CodeRabbit