OCPEDGE-2612: Automate OCP-88799-Verify reclaimPolicy and volumeBindingMode combinations#2383
OCPEDGE-2612: Automate OCP-88799-Verify reclaimPolicy and volumeBindingMode combinations#2383mmakwana30 wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdded an OpenShift StorageClass template and a helper to apply it with defaults, plus a Ginkgo integration test that validates PVC/PV behavior for Delete+Immediate and Retain+WaitForFirstConsumer scenarios and cleans up logicalvolume CRs for retained volumes. ChangesLVMS StorageClass Policy Test
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 12 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@test/integration/qe_tests/lvms_utils.go`:
- Around line 2010-2032: The helper currently forces ALLOWEXPANSION to false
when callers omit allowExpansion because Go's zero value is false; change
storageClassConfig.allowExpansion from bool to *bool so you can distinguish
"unset" (nil) from set values, then update createStorageClassWithOC to only set
allowExpansionStr/ALOWEXPANSION when cfg.allowExpansion != nil (use "true" or
"false" based on *cfg.allowExpansion); update callers of
storageClassConfig/createStorageClassWithOC to pass a pointer when they need to
override the default.
🪄 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 YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 7d9d79af-1719-446d-9e5f-58496a1c6dc0
📒 Files selected for processing (3)
test/integration/qe_tests/lvms.gotest/integration/qe_tests/lvms_utils.gotest/integration/qe_tests/testdata/storageclass-template.yaml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@test/integration/qe_tests/lvms.go`:
- Around line 5055-5066: The StorageClass names (e.g., the scDeleteImmediate
variable used in the createStorageClassWithOC call and its matching
deleteSpecifiedResource defer) are fixed and must be made unique by appending
the existing uniqueSuffix; update each cluster-scoped StorageClass name
assignment (e.g., scDeleteImmediate and the other SC variables around lines
5105-5116) to include "+" uniqueSuffix (or fmt.Sprintf("%s-%s", name,
uniqueSuffix)) and ensure the same unique name is passed into
createStorageClassWithOC and deleteSpecifiedResource so creation and cleanup use
the identical, unique identifier.
🪄 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 YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: e4d67c65-8ae8-4208-b4d6-ca22c79db9bd
📒 Files selected for processing (3)
test/integration/qe_tests/lvms.gotest/integration/qe_tests/lvms_utils.gotest/integration/qe_tests/testdata/storageclass-template.yaml
✅ Files skipped from review due to trivial changes (1)
- test/integration/qe_tests/testdata/storageclass-template.yaml
There was a problem hiding this comment.
♻️ Duplicate comments (1)
test/integration/qe_tests/lvms.go (1)
5046-5049:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUse a unique namespace name to avoid test collisions.
testNs := "lvms-test-88799"is static and can collide across reruns/parallel jobs, causing flakyAlreadyExistsfailures.Suggested diff
- testNs := "lvms-test-88799" + testNs := fmt.Sprintf("lvms-test-88799-%d", time.Now().UnixNano())🤖 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/integration/qe_tests/lvms.go` around lines 5046 - 5049, The test uses a static namespace name via the testNs variable which can cause AlreadyExists collisions; change the setup to generate a unique namespace name for each run (e.g., append a timestamp/UUID/random suffix) where testNs is assigned before calling createNamespaceWithOC, so createNamespaceWithOC(testNs) and the deferred deleteSpecifiedResource("namespace", testNs, "") use that generated unique name.
🤖 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.
Duplicate comments:
In `@test/integration/qe_tests/lvms.go`:
- Around line 5046-5049: The test uses a static namespace name via the testNs
variable which can cause AlreadyExists collisions; change the setup to generate
a unique namespace name for each run (e.g., append a timestamp/UUID/random
suffix) where testNs is assigned before calling createNamespaceWithOC, so
createNamespaceWithOC(testNs) and the deferred
deleteSpecifiedResource("namespace", testNs, "") use that generated unique name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: cebbfdcf-452e-4cbb-ac6e-d55977a87ecf
📒 Files selected for processing (3)
test/integration/qe_tests/lvms.gotest/integration/qe_tests/lvms_utils.gotest/integration/qe_tests/testdata/storageclass-template.yaml
|
/retest |
|
/override ci/prow/snyk-deps |
|
@mmakwana30: 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. |
|
@pacevedom: Overrode contexts on behalf of pacevedom: ci/prow/snyk-deps 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. |
|
/lgtm |
|
/retitle OCPEDGE-2612: Automate OCP-88799-Verify reclaimPolicy and volumeBindingMode combinations |
|
@mmakwana30: This pull request references OCPEDGE-2612 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. 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: mmakwana30, pacevedom 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 |
|
/retest |
|
/hold Revision 1b98235 was retested 3 times: holding |
|
/test e2e-aws-hypershift |
|
/retest |
1 similar comment
|
/retest |
|
/hold cancel |
|
@mmakwana30: 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. |
Jira: https://redhat.atlassian.net/browse/OCPEDGE-2612
Logs: https://privatebin.corp.redhat.com/?f3ebe41a5a3d0fdc#BfSzHS9X6eCKwBC8EsZ17D8Bv29RestR6KEK9UwtjSAF
Summary by CodeRabbit
Tests
Chores