Skip to content

fix(e2e): skip failswitch on operator and use NAME_SPACE - #5205

Open
rostalan wants to merge 3 commits into
redhat-developer:release-1.9from
rostalan:fix/failswitch-e2e-operator-ns-release-1.9
Open

fix(e2e): skip failswitch on operator and use NAME_SPACE#5205
rostalan wants to merge 3 commits into
redhat-developer:release-1.9from
rostalan:fix/failswitch-e2e-operator-ns-release-1.9

Conversation

@rostalan

@rostalan rostalan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Operator jobs skip orchestrator workflow deploy, so failswitch should follow greeting/all-runs and fixme there. Also target process.env.NAME_SPACE for the in-cluster httpbin mock instead of the Playwright project name.

Operator jobs skip orchestrator workflow deploy, so failswitch should follow greeting/all-runs and fixme there. Also target process.env.NAME_SPACE for the in-cluster httpbin mock instead of the Playwright project name.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Fix Orchestrator failswitch e2e: skip on Operator jobs and read NAME_SPACE

🐞 Bug fix 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Mark failswitch workflow e2e as fixme for Operator jobs missing orchestrator deploy.
• Resolve namespace selection by using NAME_SPACE env var for in-cluster httpbin.
• Simplify test signature by removing unused Playwright testInfo dependency.
Diagram

graph TD
  A["CI job"] --> B["Job-name matcher"] --> C["Playwright: failswitch spec"] --> D["Orchestrator UI/API"] --> E[("K8s namespace")]
  C --> F["httpbin mock"]

  subgraph Legend
    direction LR
    _ci["CI/job"] ~~~ _test["Test spec"] ~~~ _svc["Service/endpoint"] ~~~ _db[("Cluster scope")]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Centralize namespace resolution in a Playwright fixture
  • ➕ Avoids repeated env-var access across specs
  • ➕ Enables consistent validation/error messaging when NAME_SPACE is missing
  • ➕ Makes swapping local vs in-cluster namespaces easier
  • ➖ Requires additional plumbing and refactors across multiple tests
  • ➖ May be overkill if only a small subset of specs needs NAME_SPACE
2. Gate Operator-specific behavior via project config instead of job-name matching
  • ➕ More explicit and test-runner-native than relying on CI job naming conventions
  • ➕ Easier to run locally by selecting a project
  • ➖ Doesn’t solve cases where CI job skips orchestrator deploy but uses same project
  • ➖ Still needs a reliable namespace source for in-cluster mocks

Recommendation: The current approach is appropriate for an immediate stabilization: explicitly marking the spec as fixme for Operator jobs prevents false failures where orchestrator deployment is absent, and switching to NAME_SPACE aligns namespace selection with cluster reality. If more specs start needing NAME_SPACE or job-based gating, consider extracting a shared fixture/config layer to reduce duplication and make environment requirements more discoverable.

Files changed (1) +7 / -2

Bug fix (1) +7 / -2
failswitch-workflow.spec.tsSkip failswitch e2e on Operator jobs and use NAME_SPACE for namespace +7/-2

Skip failswitch e2e on Operator jobs and use NAME_SPACE for namespace

• Adds a fixme gate to disable the suite when running in Operator CI jobs (pending an upstream bug fix). Updates namespace selection to read process.env.NAME_SPACE (and skips when unset) instead of relying on the Playwright project name; also removes the unused testInfo parameter.

e2e-tests/playwright/e2e/plugins/orchestrator/failswitch-workflow.spec.ts

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Aug 3, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 46 rules
✅ Cross-repo context
  Explored: repo: redhat-developer/rhdh-operator (branch: release-1.9, sha: 59fdf8d5)
  Not relevant to this PR: redhat-developer/rhdh-plugins
  Not relevant to this PR: redhat-developer/rhdh-chart
  Not relevant to this PR: redhat-developer/rhdh-local

Grey Divider


Informational

1. test.fixme TODO link wrong ✓ Resolved 📜 Skill insight ✧ Quality
Description
The newly added test.fixme() is preceded by a TODO comment, but the link uses
https://issues.redhat.com/... instead of the required Jira format
https://redhat.atlassian.net/browse/RHDHBUGS-XXXX. This breaks the mandated traceability for
fixme-skipped tests.
Code

e2e-tests/playwright/e2e/plugins/orchestrator/failswitch-workflow.spec.ts[R15-16]

+  // TODO: https://issues.redhat.com/browse/RHDHBUGS-2184 fix orchestrator tests on Operator deployment
+  test.fixme(() => skipIfJobName(JOB_NAME_PATTERNS.OPERATOR));
Relevance

● Weak

Repo fixme TODOs use issues.redhat.com links (PR #3508); Jira-link cleanup PR #4173 didn’t enforce
atlassian format.

PR-#3508
PR-#4173

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The checklist requires test.fixme() to be immediately preceded by a TODO comment with a Jira link
in the https://redhat.atlassian.net/browse/RHDHBUGS-XXXX format. The added TODO comment uses
https://issues.redhat.com/browse/RHDHBUGS-2184, which does not match the required format.

e2e-tests/playwright/e2e/plugins/orchestrator/failswitch-workflow.spec.ts[15-16]
Skill: e2e-diagnose-and-fix

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`test.fixme()` must be immediately preceded by a TODO comment linking to a Jira ticket in the exact required format: `// TODO: https://redhat.atlassian.net/browse/RHDHBUGS-XXXX`.

## Issue Context
In `failswitch-workflow.spec.ts`, the TODO link currently points to `https://issues.redhat.com/browse/...`, which does not meet the compliance rule format requirement.

## Fix Focus Areas
- e2e-tests/playwright/e2e/plugins/orchestrator/failswitch-workflow.spec.ts[15-16]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@rostalan

rostalan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator

@rostalan

rostalan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/test

@rostalan

rostalan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-nightly

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@rostalan

rostalan commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-nightly

1 similar comment
@rostalan

rostalan commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-nightly

type EnvEntry = { name: string; value: string };

test.describe("Orchestrator failswitch workflow tests", () => {
// TODO: https://redhat.atlassian.net/browse/RHDHBUGS-2184 fix orchestrator tests on Operator deployment

@zdrapela zdrapela Aug 4, 2026

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.

The TODO mentions an already closed issue (https://redhat.atlassian.net/browse/RHDHBUGS-2184). It was closed as already fixed on Overlays. Can you please update the link and/or create a new issue specifically for this branch for tracking?

Replace closed RHDHBUGS-2184 with the open tracking issue.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@zdrapela

zdrapela commented Aug 4, 2026

Copy link
Copy Markdown
Member

/lgtm

@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown

@rostalan: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ocp-operator-nightly 5c89cc1 link false /test e2e-ocp-operator-nightly
ci/prow/e2e-ocp-helm bdfa46b link true /test e2e-ocp-helm

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants