Skip to content

OCPBUGS-105523: Fix flaky perspective query parameter e2e tests - #16940

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
rhamilto:OCPBUGS-105523
Aug 11, 2026
Merged

OCPBUGS-105523: Fix flaky perspective query parameter e2e tests#16940
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
rhamilto:OCPBUGS-105523

Conversation

@rhamilto

@rhamilto rhamilto commented Aug 10, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:

The console/crud/other-routes.spec.ts "Perspective query parameters" Playwright e2e tests intermittently fail with a 120s test timeout. The error shows element was detached from the DOM, retrying when clicking the Developer perspective menu option.

Three contributing issues:

  1. Missing warmupSPA: Tests navigate to deep URLs without first establishing the SPA session, which can land on the OAuth login page.

  2. No guard for Developer option availability: The second test clicks the perspective switcher toggle and immediately tries to click the Developer option without verifying it exists and is stable. The option may not be in the DOM yet or gets detached during a re-render.

  3. Assumes serial execution without configuration: The second test assumes the first test enabled the Developer perspective, but the describe block is not configured as serial and each test gets a fresh browser context.

Solution description:

  • Added warmupSPA calls before deep navigation in both tests
  • Replaced inline perspective enablement logic with the shared ensureDeveloperPerspective helper (which verifies the Developer menu option is actually visible before proceeding)
  • Made the second test independently ensure the Developer perspective is available
  • Used perspective=dev query parameter to switch to Developer perspective instead of manually clicking unstable menu options

Screenshots / screen recording:

Test setup:
Run the other-routes.spec.ts Playwright e2e tests against a cluster.

Test cases:

  • "Developer query parameter switches to Developer perspective" passes consistently
  • "Administrator query parameter switches to Administrator perspective" passes consistently
  • Tests pass on clusters where Developer perspective is already enabled
  • Tests pass on clusters where Developer perspective needs to be enabled

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
Jira: https://redhat.atlassian.net/browse/OCPBUGS-105523

Reviewers and assignees:

Summary by CodeRabbit

  • Tests
    • Improved end-to-end coverage for perspective selection through URL parameters.
    • Added more reliable validation that the Developer perspective is available before testing Administrator perspective behavior.
    • Streamlined test setup to reduce failures caused by inconsistent navigation or application state.

The "Perspective query parameters" tests in other-routes.spec.ts flake
for three reasons: no warmupSPA before deep navigation, no guard for
the Developer option being available in the switcher menu, and the
second test assuming the first test's state without serial execution.

Use the shared ensureDeveloperPerspective helper and warmupSPA in both
tests, and switch perspective via the query parameter instead of
manually clicking unstable menu options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-105523, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Analysis / Root cause:

The console/crud/other-routes.spec.ts "Perspective query parameters" Playwright e2e tests intermittently fail with a 120s test timeout. The error shows element was detached from the DOM, retrying when clicking the Developer perspective menu option.

Three contributing issues:

  1. Missing warmupSPA: Tests navigate to deep URLs without first establishing the SPA session, which can land on the OAuth login page.

  2. No guard for Developer option availability: The second test clicks the perspective switcher toggle and immediately tries to click the Developer option without verifying it exists and is stable. The option may not be in the DOM yet or gets detached during a re-render.

  3. Assumes serial execution without configuration: The second test assumes the first test enabled the Developer perspective, but the describe block is not configured as serial and each test gets a fresh browser context.

Solution description:

  • Added warmupSPA calls before deep navigation in both tests
  • Replaced inline perspective enablement logic with the shared ensureDeveloperPerspective helper (which verifies the Developer menu option is actually visible before proceeding)
  • Made the second test independently ensure the Developer perspective is available
  • Used perspective=dev query parameter to switch to Developer perspective instead of manually clicking unstable menu options

Screenshots / screen recording:

Test setup:
Run the other-routes.spec.ts Playwright e2e tests against a cluster.

Test cases:

  • "Developer query parameter switches to Developer perspective" passes consistently
  • "Administrator query parameter switches to Administrator perspective" passes consistently
  • Tests pass on clusters where Developer perspective is already enabled
  • Tests pass on clusters where Developer perspective needs to be enabled

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
Jira: https://redhat.atlassian.net/browse/OCPBUGS-105523

Reviewers and assignees:

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.

@openshift-ci
openshift-ci Bot requested review from cajieh and stefanonardo August 10, 2026 20:41
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 186b54a7-3c79-45e4-ab6d-f9e0fb9ebb52

📥 Commits

Reviewing files that changed from the base of the PR and between 3f193fd and a3cd43e.

📒 Files selected for processing (2)
  • frontend/e2e/pages/base-page.ts
  • frontend/e2e/tests/console/crud/other-routes.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/e2e/tests/console/crud/other-routes.spec.ts

Walkthrough

The perspective query-parameter E2E tests now use shared SPA warmup and Developer perspective helpers. The helper reports whether it changed cluster configuration. The Administrator test verifies the Developer perspective before testing the Administrator parameter.

Changes

Perspective query tests

Layer / File(s) Summary
Developer perspective setup result
frontend/e2e/pages/base-page.ts
ensureDeveloperPerspective returns true when it enables multiple perspectives and false when no change is needed.
Shared route initialization
frontend/e2e/tests/console/crud/other-routes.spec.ts
The tests use shared SPA warmup and perspective setup instead of manual navigation, detection, patching, reloads, and toggle validation. The Administrator test verifies the Developer perspective before testing its route parameter.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: cajieh, stefanonardo

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Jira issue and the primary change: fixing flaky perspective query parameter e2e tests.
Description check ✅ Passed The description covers the root cause, solution, setup, test cases, and non-visual scope, but browser results remain unchecked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR uses Playwright tests, not Ginkgo. Its explicit titles are static, and the route-derived title uses fixed source literals with no run-dependent values.
Test Structure And Quality ✅ Passed The changed code is a Playwright spec using @playwright/test, test.describe, and test.afterAll; it contains no Ginkgo It/Eventually code, so this Ginkgo-specific check is not applicable.
Microshift Test Compatibility ✅ Passed The patch changes only frontend Playwright TypeScript files; it adds no Ginkgo tests or new MicroShift-incompatible API references.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The patch only modifies Playwright TypeScript helpers and existing perspective tests; it adds no Ginkgo tests or multi-node/HA assumptions requiring SNO protection.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only Playwright E2E TypeScript helpers and tests; it adds no deployment manifests, operators, controllers, replicas, affinity, tolerations, selectors, spreads, or PDBs.
Ote Binary Stdout Contract ✅ Passed The patch changes only two TypeScript Playwright files; it adds no Go OTE binary code, suite setup, logging, or stdout writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The patch modifies existing Playwright TypeScript tests only; it adds no Ginkgo tests, IPv4 literals, IPv4 parsing, or public-network connectivity.
No-Weak-Crypto ✅ Passed The full PR changes only two E2E TypeScript files; patch and changed-file scans found no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The commit changes only two TypeScript test files, and added lines contain no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The full PR diff adds no console/logger/print statements and no sensitive-data literals; changed code only updates Playwright navigation and Kubernetes patch behavior.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@rhamilto

Copy link
Copy Markdown
Member Author

/jira refresh
/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-playwright

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-105523, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh
/pipeline required

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.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-105523, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Analysis / Root cause:

The console/crud/other-routes.spec.ts "Perspective query parameters" Playwright e2e tests intermittently fail with a 120s test timeout. The error shows element was detached from the DOM, retrying when clicking the Developer perspective menu option.

Three contributing issues:

  1. Missing warmupSPA: Tests navigate to deep URLs without first establishing the SPA session, which can land on the OAuth login page.

  2. No guard for Developer option availability: The second test clicks the perspective switcher toggle and immediately tries to click the Developer option without verifying it exists and is stable. The option may not be in the DOM yet or gets detached during a re-render.

  3. Assumes serial execution without configuration: The second test assumes the first test enabled the Developer perspective, but the describe block is not configured as serial and each test gets a fresh browser context.

Solution description:

  • Added warmupSPA calls before deep navigation in both tests
  • Replaced inline perspective enablement logic with the shared ensureDeveloperPerspective helper (which verifies the Developer menu option is actually visible before proceeding)
  • Made the second test independently ensure the Developer perspective is available
  • Used perspective=dev query parameter to switch to Developer perspective instead of manually clicking unstable menu options

Screenshots / screen recording:

Test setup:
Run the other-routes.spec.ts Playwright e2e tests against a cluster.

Test cases:

  • "Developer query parameter switches to Developer perspective" passes consistently
  • "Administrator query parameter switches to Administrator perspective" passes consistently
  • Tests pass on clusters where Developer perspective is already enabled
  • Tests pass on clusters where Developer perspective needs to be enabled

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
Jira: https://redhat.atlassian.net/browse/OCPBUGS-105523

Reviewers and assignees:

Summary by CodeRabbit

  • Tests
  • Improved end-to-end coverage for perspective selection through URL parameters.
  • Added more reliable validation that the Developer perspective is available before testing Administrator perspective behavior.
  • Streamlined test setup to reduce failures caused by inconsistent navigation or application state.

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 coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@frontend/e2e/tests/console/crud/other-routes.spec.ts`:
- Line 179: Update frontend/e2e/tests/console/crud/other-routes.spec.ts at lines
179-179 and 196-196: in both call sites of ensureDeveloperPerspective, set or
register patchedPerspectives only when the helper actually mutates cluster
perspective configuration, including mutations from the Administrator test, so
suite cleanup removes only test-created configuration.
🪄 Autofix

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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dc9fafb5-cf9c-4584-8a3b-6b5909e9a34b

📥 Commits

Reviewing files that changed from the base of the PR and between 4b51a79 and 3f193fd.

📒 Files selected for processing (1)
  • frontend/e2e/tests/console/crud/other-routes.spec.ts

Comment thread frontend/e2e/tests/console/crud/other-routes.spec.ts Outdated
ensureDeveloperPerspective is a no-op when the Developer perspective
is already available. Return a boolean indicating whether the cluster
config was patched so afterAll cleanup only removes test-created
configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhamilto

Copy link
Copy Markdown
Member Author

/label tide/merge-method-sqaush
/pipeline required

@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@rhamilto: The label(s) /label tide/merge-method-sqaush cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, rebase/manual, cluster-config-api-changed, run-integration-tests, verified, ready-for-human-review, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/skip-dependent-bug-check, jira/valid-bug, ok-to-test, plugin-api-approved, plugin-api-changed, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

Details

In response to this:

/label tide/merge-method-sqaush
/pipeline required

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.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-playwright

@rhamilto

Copy link
Copy Markdown
Member Author

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 10, 2026

@logonoff logonoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhamilto

Copy link
Copy Markdown
Member Author

/test e2e-playwright

@rhamilto

Copy link
Copy Markdown
Member Author

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 11, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@rhamilto: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 9e8eaab into openshift:main Aug 11, 2026
11 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: Jira Issue Verification Checks: Jira Issue OCPBUGS-105523
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-105523 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

Analysis / Root cause:

The console/crud/other-routes.spec.ts "Perspective query parameters" Playwright e2e tests intermittently fail with a 120s test timeout. The error shows element was detached from the DOM, retrying when clicking the Developer perspective menu option.

Three contributing issues:

  1. Missing warmupSPA: Tests navigate to deep URLs without first establishing the SPA session, which can land on the OAuth login page.

  2. No guard for Developer option availability: The second test clicks the perspective switcher toggle and immediately tries to click the Developer option without verifying it exists and is stable. The option may not be in the DOM yet or gets detached during a re-render.

  3. Assumes serial execution without configuration: The second test assumes the first test enabled the Developer perspective, but the describe block is not configured as serial and each test gets a fresh browser context.

Solution description:

  • Added warmupSPA calls before deep navigation in both tests
  • Replaced inline perspective enablement logic with the shared ensureDeveloperPerspective helper (which verifies the Developer menu option is actually visible before proceeding)
  • Made the second test independently ensure the Developer perspective is available
  • Used perspective=dev query parameter to switch to Developer perspective instead of manually clicking unstable menu options

Screenshots / screen recording:

Test setup:
Run the other-routes.spec.ts Playwright e2e tests against a cluster.

Test cases:

  • "Developer query parameter switches to Developer perspective" passes consistently
  • "Administrator query parameter switches to Administrator perspective" passes consistently
  • Tests pass on clusters where Developer perspective is already enabled
  • Tests pass on clusters where Developer perspective needs to be enabled

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
Jira: https://redhat.atlassian.net/browse/OCPBUGS-105523

Reviewers and assignees:

Summary by CodeRabbit

  • Tests
  • Improved end-to-end coverage for perspective selection through URL parameters.
  • Added more reliable validation that the Developer perspective is available before testing Administrator perspective behavior.
  • Streamlined test setup to reduce failures caused by inconsistent navigation or application state.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants