Skip to content

fix(e2e): restore readiness gates for runtime, auth, and localization - #5083

Open
schultzp2020 wants to merge 23 commits into
mainfrom
fix/e2e-readiness-and-localization-gates
Open

fix(e2e): restore readiness gates for runtime, auth, and localization#5083
schultzp2020 wants to merge 23 commits into
mainfrom
fix/e2e-readiness-and-localization-gates

Conversation

@schultzp2020

@schultzp2020 schultzp2020 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores and hardens RHDH E2E readiness after #5004 / #5022 broke nightlies, then deepens auth/runtime/operator install so defaults (especially lightspeed) cannot recreate the same failure class.

  • Instance readinessglobalSetup classifies BASE_URL as unset | router-stub | instance-url; runtime jobs keep a predicted URL + RUNTIME_AUTO_DEPLOY=true; auth leaves BASE_URL empty so the harness self-deploys.
  • Localization — drop smoke-test deps that asserted English "Welcome back!".
  • Shared operator install profilesOperatorInstallProfile + DynamicPluginsProfile own apiVersion, flavours: [], includes: [], and BACKEND_SECRET for runtime and auth adapters.
  • Auth deployAuthInstanceDeployer stages created → HTTP /healthcheck → catalog synced; config liveness, IdP waits, cookie/session isolation, and OIDC autologout hardenings for reconcile races.
  • CI operator CRs — pin flavours: [] on rhdh-start*.yaml (same lightspeed invariant as Playwright); unit test locks the seam; fail-closed wait for customization-provider S2I so Deployment image is never " ".
  • Restore e2e-tests/.lintstagedrc.js and document /test ? / /test <job> for agents/contributors.
flowchart TB
  subgraph globalSetup["Playwright globalSetup"]
    A[classify BASE_URL] --> B{mode?}
    B -->|router-stub, no auto-deploy| C[no-op]
    B -->|RUNTIME_AUTO_DEPLOY| D[ensureRuntimeDeployed]
    D --> E[set instance BASE_URL]
    E --> F["GET /healthcheck"]
    B -->|instance-url| F
    B -->|unset, no auto-deploy| C
  end

  subgraph authDeploy["AuthInstanceDeployer"]
    P[OperatorInstallProfile + DynamicPluginsProfile] --> Q[apply CR / CMs]
    Q --> R[wait Deployment created]
    R --> S["HTTP /healthcheck ≤ 600s"]
    S --> T[wait catalog synced]
  end

  subgraph ciOperator["CI operator nightlies"]
    CR["rhdh-start*.yaml flavours: []"] --> DP[install-dynamic-plugins]
    DP --> Ready[showcase / showcase-rbac]
  end

  globalSetup -.->|auth BASE_URL empty| authDeploy
Loading

Why auth / operator were still failing after the gate fix

  1. Auth YAML omitted flavours / includes, so the operator reintroduced defaults (e.g. lightspeed) and readiness stayed on HTTP 503. Runtime already encoded those invariants; profiles close the drift.
  2. Auth tests then hit reconcile races (sessionDuration leakage, progressbar/main gates, aborted navigations, OIDC refresh-cookie timing) — hardened in follow-up commits.
  3. Operator nightly CrashLooped install-dynamic-plugins with a lightspeed-core sidecar because CI start CRs lacked flavours: []. Pinned to match OperatorInstallProfile.

Follow-up (only if operator nightly still red)

flavours: [] should remove the lightspeed-core sidecar. Operator CI still uses helm value-file includes: [dynamic-plugins.default.yaml]. Helm is already green with that list — leave it alone unless a retest CrashLoops without lightspeed-core, then pin includes: [] (or disable the bad OCI) on the operator path.

Test plan

Rebased onto main; tip is 823bbd91. Re-trigger nightlies after the force-push:

  • cd e2e-tests && yarn test:unit
  • cd e2e-tests && yarn lint / yarn fmt:check
  • /test e2e-ocp-helm-nightly
  • /test e2e-ocp-helm-localization-nightly
  • /test e2e-ocp-operator-nightly — expect no lightspeed-core; no CrashLoop on showcase / showcase-rbac
  • /test e2e-ocp-operator-auth-providers-nightly — OIDC autologout + provider flows green
  • Localization: no smoke "Welcome back!" failure
  • showcase-runtime progresses past globalSetup
  • auth-providers: deploy reaches HTTP ready / synced

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.77%. Comparing base (1af7158) to head (ba327e0).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5083      +/-   ##
==========================================
- Coverage   55.39%   54.77%   -0.62%     
==========================================
  Files         122      110      -12     
  Lines        2365     2147     -218     
  Branches      544      537       -7     
==========================================
- Hits         1310     1176     -134     
+ Misses       1049      970      -79     
+ Partials        6        1       -5     
Flag Coverage Δ
rhdh 54.77% <ø> (-0.62%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1af7158...ba327e0. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-helm-nightly
/test e2e-ocp-operator-nightly
/test e2e-ocp-helm-localization-nightly
/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

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

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-nightly
/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

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

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

1 similar comment
@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

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

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

@schultzp2020
schultzp2020 force-pushed the fix/e2e-readiness-and-localization-gates branch from 62f7502 to 0953344 Compare July 10, 2026 22:54
@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

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

@schultzp2020

schultzp2020 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

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

@zdrapela

Copy link
Copy Markdown
Member

/test e2e-ocp-helm

@zdrapela

Copy link
Copy Markdown
Member

/test e2e-ocp-helm-nightly
/test e2e-ocp-operator-nightly

@zdrapela

Copy link
Copy Markdown
Member

/agentic-review

Comment thread .ci/pipelines/jobs/ocp-operator.sh Outdated
Comment thread .ci/pipelines/jobs/ocp-nightly.sh Outdated
Comment thread e2e-tests/playwright/utils/runtime-deploy.ts Outdated
Comment thread e2e-tests/.lintstagedrc.js Outdated
@zdrapela

Copy link
Copy Markdown
Member

/agentic-review

@schultzp2020

schultzp2020 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-helm-nightly
/test e2e-ocp-operator-nightly
/test e2e-ocp-operator-auth-providers-nightly

@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).

@schultzp2020

schultzp2020 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-operator-auth-providers-nightly

schultzp2020 and others added 21 commits July 16, 2026 09:52
Co-authored-by: Cursor <cursoragent@cursor.com>
Auth fixtures looked for yamls under rhdh-deployment/ after the folder
split. Operator runtime was missing BACKEND_SECRET/auth.keys and the
homepage plugin, leaving readiness at HTTP 503.

Co-authored-by: Cursor <cursoragent@cursor.com>
prepareProvider updates ConfigMaps before createBackstageDeployment.
Capturing reconcile baseline must tolerate a missing deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
waitForRolloutStart treated a missing Deployment as a hard error, so
auth prepareProvider failed immediately after applying the Backstage CR.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract OperatorInstallProfile and DynamicPluginsProfile so auth and
runtime stop drifting on flavours, includes, and BACKEND_SECRET. Stage
auth deploy readiness as Available → HTTP → synced behind AuthInstanceDeployer.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop dual BACKEND_SECRET injection, stage created→HTTP→synced so 503s
surface before Available timeouts, always publish instance BASE_URL after
runtime deploy, and align auth YAML fixtures with the install profile.

Co-authored-by: Cursor <cursoragent@cursor.com>
Auth CI leaves BASE_URL empty so globalSetup no-ops, but rhdhContext ignored
describe-level baseURL and login goto("/") failed with invalid URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize helm/operator URL naming, scope RUNTIME_AUTO_DEPLOY so it
cannot stomp later projects, wait for authenticated global-header after
OAuth, and kill port-forward process groups cleanly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix catalog sync log races, assert cookieMaxAge for refresh tokens,
stop Azure redirect churn, tolerate failed-login alerts, and re-order
OIDC+GitHub secondary auth around reconcile.

Co-authored-by: Cursor <cursoragent@cursor.com>
Force pod restart and Deployment Ready after ConfigMap updates so resolvers,
sessionDuration, and autologout actually load; switch cookie tests to the
correct Backstage key and harden post-reconcile navigation/IdP waits.

Co-authored-by: Cursor <cursoragent@cursor.com>
Default reconcile waits HTTP-only after mounted-config proof, shares cookie
and label helpers, returns authenticated|error from login, and moves GitHub
provider sign-out into the Settings POM.

Co-authored-by: Cursor <cursoragent@cursor.com>
Playwright TimeoutError from request.get aborted expect.poll after one
attempt, so post-reconcile HTTP readiness never used its full budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
The catalog identity-error regex had a ';u' typo that broke expected-error
cases; also reuse healthy auth namespaces on worker restart and harden
IdP popup/login outcome locality so nightlies stop burning the 2h budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
Worker-restart reuse was dying on AlreadyExists when recreating secrets, and
sessionDuration cases inherited broken resolvers from earlier login tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
…tions

Requiring role=main before loader settle burned the readiness budget on
stuck progressbar paints; also retry ERR_ABORTED and enrich secret k8s errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ap errors

Make waitForAppReady observe the CI stuck-progressbar paint, reset the page
before goto retries, and surface ConfigMap k8s failures with status detail.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pin autologout resolver/config, poll refresh-cookie absence after reload,
and wrap config-liveness/wait API failures so CI no longer shows opaque HttpErrors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Operator nightlies CrashLoop when the default lightspeed flavour injects
OCI pulls; pin flavours: [] on start CRs to match OperatorInstallProfile.
Also fail closed until the customization-provider S2I build leaves a
non-whitespace Deployment image.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore #4791 lightspeed disabled overrides in showcase helm values so
install-dynamic-plugins cannot fail on unresolved {{inherit}}. Raise
catalog API timeouts and poll ingestion checks so OIDC entity sync can
finish through Routes without cascading skips.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop burning the 120s ingestion budget on HTTP/shape errors, drop nested
expect.poll wrappers, and align CI lightspeed overrides with post-#5021
enabled:false so helm/auth nightlies fail for the right reason.

Co-authored-by: Cursor <cursoragent@cursor.com>
@schultzp2020
schultzp2020 force-pushed the fix/e2e-readiness-and-localization-gates branch from 823bbd9 to ba327e0 Compare July 16, 2026 14:52
@sonarqubecloud

Copy link
Copy Markdown

@schultzp2020

Copy link
Copy Markdown
Contributor Author

/test e2e-ocp-helm-nightly
/test e2e-ocp-operator-nightly
/test e2e-ocp-helm-localization-nightly
/test e2e-ocp-operator-auth-providers-nightly

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: failure.

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

@schultzp2020: 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-helm ba327e0 link true /test e2e-ocp-helm
ci/prow/e2e-ocp-operator-nightly ba327e0 link false /test e2e-ocp-operator-nightly
ci/prow/e2e-ocp-operator-auth-providers-nightly ba327e0 link false /test e2e-ocp-operator-auth-providers-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.

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

PR needs rebase.

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.

@zdrapela

Copy link
Copy Markdown
Member

/test e2e-ocp-helm-nightly
/test e2e-ocp-operator-nightly
/test e2e-ocp-helm-localization-nightly
/test e2e-ocp-operator-auth-providers-nightly

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