[release-4.16] OCPBUGS-88554: Stabilize legacy OperatorHub Cypress waits#16608
[release-4.16] OCPBUGS-88554: Stabilize legacy OperatorHub Cypress waits#16608RadekManak wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-88027, which is valid. The bug has been moved to the POST state. 7 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. |
WalkthroughThis PR introduces a reusable Cypress view helper for OperatorHub synchronization with a 60-second timeout, and updates two integration tests to use it. The helper waits for skeleton removal, verifies key UI elements are visible, and ensures catalog tiles are rendered before proceeding. ChangesOperatorHub Test Synchronization Helper
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-88027, which is valid. 7 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. |
|
@RadekManak: 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. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/operator-hub.cy.ts (1)
48-55: ⚡ Quick winConsider adding explicit timeout for consistency with other waits.
The
cy.get('.co-catalog-tile')on line 49 and the subsequentshould()assertion will retry using Cypress's default timeout (typically 4 seconds). All other synchronization waits in this file use the explicitOPERATOR_HUB_LOAD_TIMEOUT(60 seconds). Given that this PR stabilizes flaky tests on slow CI environments, catalog tile updates after filter toggles may occasionally exceed the default timeout.🔧 Suggested enhancement for consistency
cy.log('wait for the Certified results to replace the Red Hat list'); - cy.get('.co-catalog-tile') + cy.get('.co-catalog-tile', { timeout: OPERATOR_HUB_LOAD_TIMEOUT }) .should(($tiles) => { expect($tiles.length).to.be.gt(0); expect($tiles.first().find('.catalog-tile-pf-title').text()).not.to.equal( origCatalogTitleTxt, ); });🤖 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 `@frontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/operator-hub.cy.ts` around lines 48 - 55, The wait for catalog tiles uses cy.get('.co-catalog-tile') without an explicit timeout; update the call to pass the shared OPERATOR_HUB_LOAD_TIMEOUT (used elsewhere in this file) so the get+should retry up to that timeout (e.g., cy.get('.co-catalog-tile', { timeout: OPERATOR_HUB_LOAD_TIMEOUT }).should(...)); this ensures the tile replacement assertion in the anonymous should callback has the same 60s timeout behavior as other waits.
🤖 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
`@frontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/operator-hub.cy.ts`:
- Around line 48-55: The wait for catalog tiles uses cy.get('.co-catalog-tile')
without an explicit timeout; update the call to pass the shared
OPERATOR_HUB_LOAD_TIMEOUT (used elsewhere in this file) so the get+should retry
up to that timeout (e.g., cy.get('.co-catalog-tile', { timeout:
OPERATOR_HUB_LOAD_TIMEOUT }).should(...)); this ensures the tile replacement
assertion in the anonymous should callback has the same 60s timeout behavior as
other waits.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2e9f26cf-7b64-403e-9bc7-fb6c008ac877
📒 Files selected for processing (3)
frontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/create-namespace.cy.tsfrontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/operator-hub.cy.tsfrontend/packages/operator-lifecycle-manager/integration-tests-cypress/views/operator-hub.view.ts
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fsgreco, RadekManak 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 |
|
@cardil: once the present PR merges, I will cherry-pick it on top of 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. |
|
Removed the cherry pick comment. This should cancel the cherry pick. |
Wait for the legacy OperatorHub search, filters, and tiles before interacting so the 4.16 OLM specs stop racing the page load.
d9cace4 to
c56ba70
Compare
|
New changes are detected. LGTM label has been removed. |
|
@RadekManak: 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. |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-88554, which is invalid:
Comment 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. |
|
/assign @TheRealJon |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-88554, which is invalid:
Comment 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. |
|
@RadekManak: The label(s) 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. |
|
/jira refresh |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-88554, which is invalid:
Comment 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. |
|
/jira refresh |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-88554, which is valid. The bug has been moved to the POST state. 7 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. |
CONSOLE Features and Fixes:
Solution description
This PR stabilizes the legacy OperatorHub Cypress flows on `release-4.16`.Why we are fixing this:
e2e-gcp-consoleonrelease-4.16is being destabilized by flaky OLM OperatorHub tests rather than by the product bug under test.e2e-gcp-consolejobs showed that onrelease-4.16,operator-hub.cy.tsfailed in 12/12 failed builds that were sampled.catalogSourceDisplayName-red-hat(9x), with the remaining 3x coming from the relatedcreate-namespace.cy.tspath timing out aroundsearch-operatorhub.release-4.16OperatorHub UI/test path.Why this needs a
release-4.16-specific fix:release-4.16still uses the legacy OperatorHub page and selectors likecatalogSourceDisplayName-red-hatandsearch-operatorhub.How this PR fixes it:
operatorHub.waitForLoaded()helper for the legacy OperatorHub page.operator-hub.cy.tsandcreate-namespace.cy.ts.Reviewers and assignees
TBDTest cases:
- Main validation target is the `e2e-gcp-console` lane on `release-4.16`, especially: - `Interacting with OperatorHub` - `Create namespace from install operators` - Cross-branch investigation from dredge indicated this specific failure mode is isolated to the legacy `release-4.16` codepath; newer branches were not failing this spec in the sampled failed builds. - Local Cypress execution is blocked in this environment because `yarn` is not installed. - Attempted locally: - `./test-cypress.sh -p olm -s 'packages/operator-lifecycle-manager/integration-tests-cypress/tests/operator-hub.cy.ts' -h true` - `./test-cypress.sh -p olm -s 'packages/operator-lifecycle-manager/integration-tests-cypress/tests/create-namespace.cy.ts' -h true`Additional info:
- This is a `release-4.16`-only stabilization for the legacy OperatorHub UI. - Diff against `release-4.16` is one commit touching three files. - The intent is to remove CI noise from a known flaky test path so `e2e-gcp-console` can validate actual regressions instead of repeatedly failing on page-load timing.Screen shots / gifs / design review:
Not applicable; test-only change.Summary by CodeRabbit
Tests