OCPBUGS-83446: Fix Cypress test timeouts by using correct timeout option#16280
OCPBUGS-83446: Fix Cypress test timeouts by using correct timeout option#16280openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
Conversation
Multiple Cypress integration tests were timing out in CI after 15 seconds despite attempting to set a 300-second timeout. The tests were using `requestTimeout` in WAIT_OPTIONS, but this option controls how long to wait for the request to be sent, not how long to wait for the response or for the cy.wait() command to complete. Changed `requestTimeout` to `timeout` in all affected test files. The `timeout` option is the correct option for controlling how long cy.wait() will wait for route aliases to resolve. Affected files: - packages/integration-tests/tests/app/admission-webhook-warning-notifications.cy.ts - packages/integration-tests/tests/app/poll-console-updates.cy.ts - packages/integration-tests/tests/cluster-settings/channel-modal.cy.ts - packages/integration-tests/tests/cluster-settings/update-in-progress.cy.ts - packages/integration-tests/tests/cluster-settings/update-modal.cy.ts - packages/integration-tests/tests/cluster-settings/updates-graph.cy.ts - packages/integration-tests/tests/cluster-settings/upgradeable-false.cy.ts - packages/integration-tests/tests/cluster-settings/worker-mcp-paused.cy.ts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@rhamilto: This pull request references Jira Issue OCPBUGS-83446, 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 @logonoff |
📝 WalkthroughWalkthroughThis pull request updates Cypress integration test configurations across multiple frontend packages. Changes include: (1) adding conditional Cypress Dashboard recording via 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 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.
🧹 Nitpick comments (1)
frontend/packages/shipwright-plugin/integration-tests/package.json (1)
11-11: Remove the trailing;for cleaner, shell-agnostic script behavior.Line [11] ends with
--spec "features/e2e/shipwright-ci.feature";. It’s unnecessary and makes parsing slightly more shell-dependent; recommend removing it for consistency.Proposed cleanup
- "test-cypress-headless": "node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run ${CYPRESS_RECORD_KEY:+--record} --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:-electron} --headless --spec \"features/e2e/shipwright-ci.feature\";", + "test-cypress-headless": "node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run ${CYPRESS_RECORD_KEY:+--record} --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:-electron} --headless --spec \"features/e2e/shipwright-ci.feature\"",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/packages/shipwright-plugin/integration-tests/package.json` at line 11, The package.json npm script "test-cypress-headless" ends with an unnecessary trailing semicolon which can cause shell-parsing differences; edit the "test-cypress-headless" script value to remove the final ";" character after --spec "features/e2e/shipwright-ci.feature" so the command ends cleanly without the semicolon, preserving the rest of the flags (node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run ${CYPRESS_RECORD_KEY:+--record} --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:-electron} --headless --spec "features/e2e/shipwright-ci.feature").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/packages/shipwright-plugin/integration-tests/package.json`:
- Line 11: The package.json npm script "test-cypress-headless" ends with an
unnecessary trailing semicolon which can cause shell-parsing differences; edit
the "test-cypress-headless" script value to remove the final ";" character after
--spec "features/e2e/shipwright-ci.feature" so the command ends cleanly without
the semicolon, preserving the rest of the flags (node --max-old-space-size=4096
../../../node_modules/.bin/cypress run ${CYPRESS_RECORD_KEY:+--record} --env
openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:-electron} --headless --spec
"features/e2e/shipwright-ci.feature").
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: c28edbc3-357f-464e-8136-c70e6438f8e0
📒 Files selected for processing (18)
frontend/packages/console-telemetry-plugin/integration-tests/package.jsonfrontend/packages/dev-console/integration-tests/package.jsonfrontend/packages/helm-plugin/integration-tests/package.jsonfrontend/packages/integration-tests/cypress-common-config.jsfrontend/packages/integration-tests/package.jsonfrontend/packages/integration-tests/tests/app/admission-webhook-warning-notifications.cy.tsfrontend/packages/integration-tests/tests/app/poll-console-updates.cy.tsfrontend/packages/integration-tests/tests/cluster-settings/channel-modal.cy.tsfrontend/packages/integration-tests/tests/cluster-settings/update-in-progress.cy.tsfrontend/packages/integration-tests/tests/cluster-settings/update-modal.cy.tsfrontend/packages/integration-tests/tests/cluster-settings/updates-graph.cy.tsfrontend/packages/integration-tests/tests/cluster-settings/upgradeable-false.cy.tsfrontend/packages/integration-tests/tests/cluster-settings/worker-mcp-paused.cy.tsfrontend/packages/knative-plugin/integration-tests/package.jsonfrontend/packages/operator-lifecycle-manager/integration-tests/package.jsonfrontend/packages/shipwright-plugin/integration-tests/package.jsonfrontend/packages/topology/integration-tests/package.jsonfrontend/packages/webterminal-plugin/integration-tests/package.json
📜 Review details
🔇 Additional comments (17)
frontend/packages/integration-tests/cypress-common-config.js (1)
108-108: Shared config placement is correct.Line 108 adds the project identifier in the common Cypress config, which is the right centralized location.
frontend/packages/integration-tests/tests/cluster-settings/update-modal.cy.ts (1)
11-11: Timeout option update looks good.Line 11 keeps the 300s wait budget while using a single reusable options constant for all waits in this spec.
frontend/packages/integration-tests/tests/app/poll-console-updates.cy.ts (1)
42-42: Good stabilization change for long-running waits.Line 42 correctly applies the extended wait setting through the shared
WAIT_OPTIONSconstant used across this suite.frontend/packages/integration-tests/tests/cluster-settings/updates-graph.cy.ts (1)
6-6: This wait-options change is clean.Line 6 standardizes the long wait configuration for intercepted cluster-version calls in this test.
frontend/packages/integration-tests/tests/cluster-settings/channel-modal.cy.ts (1)
11-11: Looks correct and consistent.Line 11 updates the shared wait options without changing test flow, keeping the intended 300s tolerance.
frontend/packages/integration-tests/tests/cluster-settings/upgradeable-false.cy.ts (1)
6-6: Approved — same fix pattern applied correctly.Line 6 preserves the long wait duration while aligning with the updated wait option shape used across related specs.
frontend/packages/integration-tests/tests/app/admission-webhook-warning-notifications.cy.ts (1)
10-10: Small but correct timeout-key update.Line 10 keeps the same 5s value and cleanly updates the shared wait option object used by both tests.
frontend/packages/integration-tests/tests/cluster-settings/worker-mcp-paused.cy.ts (1)
6-6: LGTM for this spec update.Line 6 applies the same timeout-options fix pattern used across the cluster-settings integration tests.
frontend/packages/topology/integration-tests/package.json (1)
11-11: Good conditional recording toggle in headless script.Line 11 correctly gates
--recordonCYPRESS_RECORD_KEYwhile preserving existing execution flags.frontend/packages/integration-tests/tests/cluster-settings/update-in-progress.cy.ts (1)
6-6: Correct wait option key for intended long wait behavior.Line 6 switches to
timeout, which is the right setting for command wait duration in this test flow.frontend/packages/console-telemetry-plugin/integration-tests/package.json (1)
11-11: LGTM: recording enabled only when key is present.Line 11 keeps the current command shape and adds a clean opt-in for Cypress recording.
frontend/packages/dev-console/integration-tests/package.json (1)
14-14: Nice update to keep recording opt-in without affecting post-processing flow.Line 14 adds the conditional
--recordflag and preserves theposttest-cypress-headlesschain.frontend/packages/webterminal-plugin/integration-tests/package.json (1)
11-11: Consistent and correct script update.Line 11 applies the same conditional recording behavior used across the other Cypress integration packages.
frontend/packages/integration-tests/package.json (1)
8-8: Good targeted change in the primary integration test runner script.Line 8 cleanly introduces optional recording with no regression to existing browser/env behavior.
frontend/packages/operator-lifecycle-manager/integration-tests/package.json (1)
8-8: Looks good and consistent with the broader Cypress script updates.Line 8 adds optional recording while preserving existing headless execution flags.
frontend/packages/knative-plugin/integration-tests/package.json (1)
11-11: Approved: opt-in recording added without altering test target configuration.Line 11 keeps the same spec targeting and runtime flags while enabling conditional dashboard recording.
frontend/packages/helm-plugin/integration-tests/package.json (1)
11-11: Looks good — conditional Cypress recording is wired correctly.Line [11] cleanly adds
--recordonly whenCYPRESS_RECORD_KEYis present, while preserving existing run options.
There was a problem hiding this comment.
requestTimeout should also be a valid WaitOption and should be still respected by cy.wait.. Claude gave me a similar "root cause" but when I pushed back it said "you're absolutely right!"
However by setting just timeout, this means we also set both requestTimeout and responseTimeout which I guess is fine - if these tests pass after a few retests I'd consider this verified
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logonoff, rhamilto 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 |
2 similar comments
|
/retest |
|
/retest |
|
/cherry-pick release-4.22 |
|
@rhamilto: 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. |
|
/cherry-pick release-4.23 |
|
@rhamilto: 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. |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-83446, which is valid. The bug has been moved to the POST state. 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. |
|
/override ci/prow/e2e-gcp-console |
|
@rhamilto: This PR has been marked as verified by 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: Overrode contexts on behalf of rhamilto: ci/prow/e2e-gcp-console 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. |
|
/override ci/prow/e2e-gcp-console |
|
@rhamilto: Overrode contexts on behalf of rhamilto: ci/prow/e2e-gcp-console 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. |
|
@rhamilto: Jira Issue Verification Checks: Jira Issue OCPBUGS-83446 Jira Issue OCPBUGS-83446 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. |
|
@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: new pull request created: #16292 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. |
|
@rhamilto: new pull request created: #16293 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. |
Includes changes from #16277 so we get Cypress Cloud Recording.
Summary
Fix Cypress integration tests timing out in CI after 15 seconds instead of the intended 300 seconds.
Problem
Multiple Cypress integration tests were failing in CI with 15-second timeouts when they should be using a 300-second timeout. The tests defined
WAIT_OPTIONS = { requestTimeout: 300000 }but this option was not being honored bycy.wait().Root Cause
The
requestTimeoutoption passed tocy.wait()controls how long to wait for the request to be sent, not how long to wait for the response to arrive or for the overall wait command to complete. Tests were timing out at the global defaultrequestTimeoutof 15 seconds (defined incypress-common-config.js:115) regardless of theWAIT_OPTIONSbeing passed.Solution
Changed
requestTimeouttotimeoutin all affected test files. Thetimeoutoption is the correct and most reliable option for controlling how longcy.wait()will wait for route aliases to resolve.Changes
Affected Files (8 total)
packages/integration-tests/tests/app/admission-webhook-warning-notifications.cy.tspackages/integration-tests/tests/app/poll-console-updates.cy.tspackages/integration-tests/tests/cluster-settings/channel-modal.cy.tspackages/integration-tests/tests/cluster-settings/update-in-progress.cy.tspackages/integration-tests/tests/cluster-settings/update-modal.cy.tspackages/integration-tests/tests/cluster-settings/updates-graph.cy.tspackages/integration-tests/tests/cluster-settings/upgradeable-false.cy.tspackages/integration-tests/tests/cluster-settings/worker-mcp-paused.cy.tsTesting
timeoutoptionrequestTimeoutin test wait options remainReferences
cy.wait()documentation: https://docs.cypress.io/api/commands/wait🤖 Generated with Claude Code
Summary by CodeRabbit