Skip to content

CI | Remove KMS condition status Init checks from tests#1755

Merged
liranmauda merged 1 commit intonoobaa:masterfrom
liranmauda:liran-fix-kms-false-positive-tests
Dec 28, 2025
Merged

CI | Remove KMS condition status Init checks from tests#1755
liranmauda merged 1 commit intonoobaa:masterfrom
liranmauda:liran-fix-kms-false-positive-tests

Conversation

@liranmauda
Copy link
Contributor

@liranmauda liranmauda commented Dec 28, 2025

Explain the changes

  • Removing False positive verification of KMS condition status Init

The Init condition status is, in most cases, a state that is short in time, and the tests are missing the timing, hence failing. We do not need this case as corev1.ConditionStatus = "Sync" will never happen if Init did not, and we will fail there.

Summary by CodeRabbit

  • Tests
    • Removed KMS initialization condition verification from test suites across multiple KMS configurations (standard, IBM Key Protect, KMIP, rotation, TLS ServiceAccount, and TLS Token scenarios).
    • Other validation checks for KMS type, synchronization, and deletion remain in place.

✏️ Tip: You can customize this high-level summary in your review settings.

- Removing False positive verification of KMS condition status Init

The Init condition status is, in most cases, a state that is short in time, and the tests are missing the timing, hence failing.
We do not need this case as corev1.ConditionStatus = "Sync"
will never happen if Init did not, and we will fail there.

Signed-off-by: liranmauda <liran.mauda@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Dec 28, 2025

📝 Walkthrough

Walkthrough

The changes remove verification of the KMS Init condition status (ConditionKMSInit) from multiple test files across different KMS scenarios (dev, IBM Key Protect, KMIP, rotation, TLS ServiceAccount, and TLS Token). Remaining test assertions for KMS Type, Sync, and other verifications remain unchanged.

Changes

Cohort / File(s) Summary
KMS Init condition verification removal
pkg/util/kms/test/dev/kms_dev_test.go, pkg/util/kms/test/ibm-kp/kms_ibm_kp_test.go, pkg/util/kms/test/kmip/kms_kmip_test.go, pkg/util/kms/test/rotate/kms_rotate_test.go, pkg/util/kms/test/tls-sa/kms_tls_sa_test.go, pkg/util/kms/test/tls-token/kms_tls_token_test.go
Removed test blocks asserting nbv1.ConditionKMSInit status across dev, IBM Key Protect, KMIP, rotation, TLS ServiceAccount, and TLS Token scenarios (2–3 blocks per file). Subsequent test checks for KMS Type, Sync, and deletion verification remain intact.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description explains the rationale for removing the checks but lacks testing instructions and missing checkboxes for doc/test status. Complete the description template by adding testing instructions and checking whether documentation or new tests were added.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: removing KMS condition status Init checks from tests across multiple test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40ea3c0 and de03454.

📒 Files selected for processing (6)
  • pkg/util/kms/test/dev/kms_dev_test.go
  • pkg/util/kms/test/ibm-kp/kms_ibm_kp_test.go
  • pkg/util/kms/test/kmip/kms_kmip_test.go
  • pkg/util/kms/test/rotate/kms_rotate_test.go
  • pkg/util/kms/test/tls-sa/kms_tls_sa_test.go
  • pkg/util/kms/test/tls-token/kms_tls_token_test.go
💤 Files with no reviewable changes (6)
  • pkg/util/kms/test/rotate/kms_rotate_test.go
  • pkg/util/kms/test/tls-sa/kms_tls_sa_test.go
  • pkg/util/kms/test/tls-token/kms_tls_token_test.go
  • pkg/util/kms/test/ibm-kp/kms_ibm_kp_test.go
  • pkg/util/kms/test/dev/kms_dev_test.go
  • pkg/util/kms/test/kmip/kms_kmip_test.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: run-kms-dev-test
  • GitHub Check: run-operator-tests
  • GitHub Check: run-kms-tls-token-test
  • GitHub Check: run-azure-vault-test
  • GitHub Check: run-cli-tests
  • GitHub Check: run-kms-kmip-test
  • GitHub Check: run-admission-test
  • GitHub Check: cnpg-deployment-test
  • GitHub Check: run-hac-test
  • GitHub Check: run-core-config-map-tests
  • GitHub Check: run-kms-key-rotate-test
  • GitHub Check: golangci-lint
  • GitHub Check: run-kms-tls-sa-test

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 and usage tips.

@liranmauda liranmauda merged commit 76cf868 into noobaa:master Dec 28, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants