Skip to content

fix(e2e): topology-rbac and kubernetes-rbac tests in k8s jobs#4656

Open
sanketpathak wants to merge 1 commit intoredhat-developer:mainfrom
sanketpathak:fix-K8s-jobs-topology-tests
Open

fix(e2e): topology-rbac and kubernetes-rbac tests in k8s jobs#4656
sanketpathak wants to merge 1 commit intoredhat-developer:mainfrom
sanketpathak:fix-K8s-jobs-topology-tests

Conversation

@sanketpathak
Copy link
Copy Markdown
Contributor

Description

Please explain the changes you made here.
Fixing E2E Failures on K8s jobs in topology-rbac and kubernetes-rbac tests

Which issue(s) does this PR fix

https://redhat.atlassian.net/browse/RHDHBUGS-2817

  • Fixes #?

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented Apr 21, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (1)

Grey Divider


Remediation recommended

1. test.fixme disabled in kubernetes-rbac 📎 Requirement gap ☼ Reliability
Description
The PR removes the non-OpenShift skip gate for kubernetes-rbac.spec.ts without adding any
handling/assertion to ensure Kubernetes objects load successfully (and no retrieval-warning banner
appears) in Kubernetes CI jobs. This risks reintroducing locator timeouts and failing the RBAC E2E
requirement on AKS/EKS/GKE.
Code

e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts[R8-10]

test.describe("Test Kubernetes Plugin", () => {
-  // TODO: https://issues.redhat.com/browse/RHDHBUGS-2817
-  test.fixme(() => process.env.IS_OPENSHIFT === "false");
+  // test.fixme(() => process.env.IS_OPENSHIFT === "false");
Evidence
Compliance requires that in Kubernetes-based CI runs the UI must not show the Kubernetes object
retrieval warning banner and that expected objects render so Playwright locators succeed. The change
comments out the environment-based test.fixme guard for non-OpenShift runs, but no accompanying
change is made to ensure resources load or that the banner does not appear when these tests now run
on Kubernetes jobs.

Kubernetes/Topology RBAC E2E tests must not show Kubernetes object retrieval warning banner
e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts[8-10]

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

## Issue description
`kubernetes-rbac.spec.ts` no longer skips when `IS_OPENSHIFT === "false"`, but the PR does not add any mitigation to ensure Kubernetes resources reliably render and the UI does not show the "There was a problem retrieving Kubernetes objects" warning banner in Kubernetes CI jobs.

## Issue Context
Compliance requires Kubernetes/Topology RBAC E2E tests to pass consistently on AKS/EKS/GKE without the retrieval-warning banner and with expected resources visible within existing locator timeouts.

## Fix Focus Areas
- e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts[8-10]

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



Advisory comments

2. Commented fixme dead code 🐞 Bug ⚙ Maintainability
Description
Both specs retain a commented-out test.fixme line, which obscures intent and makes future triage
harder. The repo already provides a shared helper (skipIfIsOpenShift) and constants for platform
gating, so leaving a commented inline env check is unnecessary and inconsistent.
Code

e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts[8]

+  // test.fixme(() => process.env.IS_OPENSHIFT === "false");
Evidence
The specs now contain a commented-out platform guard instead of either removing it entirely (if
tests must run everywhere) or expressing the gating via the shared helper and constants intended for
this purpose.

e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts[8-10]
e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts[7-9]
e2e-tests/playwright/utils/helper.ts[88-107]
e2e-tests/playwright/utils/constants.ts[52-60]

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

### Issue description
Commented-out `test.fixme(...)` lines are dead code and make it unclear whether platform gating is intended.

### Issue Context
If these tests are meant to run on non-OpenShift, the commented lines should be deleted. If gating is still desired, use the shared helper (`skipIfIsOpenShift(IS_OPENSHIFT_VALUES.FALSE)`) instead of an inline env-string check.

### Fix Focus Areas
- e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts[8-10]
- e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts[7-9]
- e2e-tests/playwright/utils/helper.ts[88-107]
- e2e-tests/playwright/utils/constants.ts[52-60]

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


Grey Divider

Qodo Logo

@sanketpathak
Copy link
Copy Markdown
Contributor Author

/test e2e-eks-helm-nightly

@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented Apr 21, 2026

Review Summary by Qodo

Re-enable kubernetes-rbac and topology-rbac E2E tests

🐞 Bug fix 🧪 Tests

Grey Divider

Walkthroughs

Description
• Uncomment kubernetes-rbac and topology-rbac E2E tests
• Remove test.fixme() skip conditions for non-OpenShift environments
• Re-enable previously disabled tests in K8s job pipelines
Diagram
flowchart LR
  A["E2E Tests<br/>Disabled"] -- "Uncomment fixme<br/>conditions" --> B["E2E Tests<br/>Re-enabled"]
  C["RHDHBUGS-2817<br/>Issue"] -- "Fix applied" --> B
Loading

Grey Divider

File Changes

1. e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts 🧪 Tests +1/-2

Re-enable kubernetes-rbac E2E tests

• Commented out test.fixme() condition that was skipping tests
• Removed TODO reference to [RHDHBUGS-2817](https://redhat.atlassian.net/browse/RHDHBUGS-2817) issue
• Re-enables kubernetes-rbac tests for non-OpenShift environments

e2e-tests/playwright/e2e/plugins/kubernetes/kubernetes-rbac.spec.ts


2. e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts 🧪 Tests +1/-2

Re-enable topology-rbac E2E tests

• Commented out test.fixme() condition that was skipping tests
• Removed TODO reference to [RHDHBUGS-2817](https://redhat.atlassian.net/browse/RHDHBUGS-2817) issue
• Re-enables topology-rbac tests for non-OpenShift environments

e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts


Grey Divider

Qodo Logo

@github-actions
Copy link
Copy Markdown
Contributor

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

@sanketpathak sanketpathak force-pushed the fix-K8s-jobs-topology-tests branch from b9f2d56 to bce3f73 Compare April 21, 2026 16:03
@github-actions
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).

@sanketpathak
Copy link
Copy Markdown
Contributor Author

/test e2e-aks-helm-nightly
/test e2e-gke-helm-nightly
/test e2e-eks-helm-nightly

@sonarqubecloud
Copy link
Copy Markdown

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 21, 2026

@sanketpathak: 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-aks-helm-nightly bce3f73 link false /test e2e-aks-helm-nightly
ci/prow/e2e-gke-helm-nightly bce3f73 link false /test e2e-gke-helm-nightly
ci/prow/e2e-eks-helm-nightly bce3f73 link false /test e2e-eks-helm-nightly

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.

1 participant