OCPBUGS-83812: Fix race conditions in OLM descriptors Cypress test#16304
Conversation
|
@rhamilto: This pull request references Jira Issue OCPBUGS-83812, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-83812, which is valid. 3 validation(s) were run on this bug
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. |
📝 WalkthroughWalkthroughThis pull request refines test infrastructure and validation logic across three integration test files. The 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@frontend/packages/operator-lifecycle-manager/integration-tests/tests/descriptors.cy.ts`:
- Around line 19-21: The cleanup command in the afterEach uses cy.exec(`oc
delete ...`, { failOnNonZeroExit: false }) which masks all failures; update the
oc delete invocation used in descriptors.cy.ts to append the flag
--ignore-not-found=true to the oc delete command string and remove the
failOnNonZeroExit: false option so only "not found" is ignored while real errors
(auth/cli issues) still surface; locate the cy.exec call that deletes
${testCRD.spec.names.kind} ${testCR.metadata.name} and make this replacement
consistent with other tests like operator-install-global.cy.ts.
🪄 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: Pro Plus
Run ID: 4f77bfb8-f1f8-4f36-981b-bec5317297cf
📒 Files selected for processing (3)
frontend/packages/integration-tests/support/admin.tsfrontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.tsfrontend/packages/operator-lifecycle-manager/integration-tests/tests/descriptors.cy.ts
📜 Review details
🔇 Additional comments (2)
frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts (1)
103-103: Good synchronization point before Create interaction.Line 103 adds a concrete UI-ready gate and should reduce flakiness before clicking Create.
frontend/packages/integration-tests/support/admin.ts (1)
18-18: Solid hardening ofcy.initAdmin()load readiness.Line 18 adds a reliable document-ready gate before perspective switching; this should reduce intermittent detach/interaction races.
5d95cb9 to
c3ba7d2
Compare
- Add explicit document ready check in initAdmin() to prevent early test execution - Replace failOnNonZeroExit: false with --ignore-not-found=true in cleanup to allow real errors (auth, CLI issues) to surface while properly handling expected "not found" scenarios Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
c3ba7d2 to
6967fc5
Compare
|
/retest |
7 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto, sg00dwin 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 |
|
@rhamilto: 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. |
|
@rhamilto: Jira Issue Verification Checks: Jira Issue OCPBUGS-83812 Jira Issue OCPBUGS-83812 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
Summary
Fixes race conditions in the OLM descriptors Cypress test:
initAdmin()to prevent early test execution--ignore-not-found=trueThese changes allow real errors (auth failures, CLI issues) to surface while properly handling expected "not found" scenarios during cleanup, consistent with patterns in other OLM integration tests.
Test plan
🤖 Generated with Claude Code