Skip to content

fix(ci): wait for the showcase-runtime rollout before running its tests - #5340

Open
gustavolira wants to merge 2 commits into
redhat-developer:release-1.10from
gustavolira:fix/e2e-runtime-readiness-gate
Open

fix(ci): wait for the showcase-runtime rollout before running its tests#5340
gustavolira wants to merge 2 commits into
redhat-developer:release-1.10from
gustavolira:fix/e2e-runtime-readiness-gate

Conversation

@gustavolira

@gustavolira gustavolira commented Sep 3, 2026

Copy link
Copy Markdown
Member

Problem

Triggering the release-1.10 OCP Helm nightly for an RC verification never reaches the sanity plugin check. The job dies inside showcase-runtime after burning its whole budget there.

The phase starts Playwright as soon as helm upgrade returns, with no readiness gate and no --wait. The first test of the showcase-runtime-db dependency project scales the deployment to 0, so while the initial rollout is still running that scale-down kills install-dynamic-plugins mid-install. The script holds a lock on the dynamic-plugins-root PVC and releases it from an atexit handler, which a hard kill skips. The lock outlives the container and every later pod blocks forever on:

======= Waiting for lock release (file: /dynamic-plugins-root/install-dynamic-plugins.lock)...

Each Azure DB test then burns its full 10 minute timeout on a pod that can never become ready. Ten attempts consume 100 minutes and the job hits the Prow timeout.

Why it surfaced now

Within release-1.10, the race needs the init container to still be running when the first test scales the deployment down. The window widens when the showcase-runtime namespace also has to extract the catalog index and pull OCI plugins, which happens when CATALOG_INDEX_IMAGE is set and helm::get_image_params injects it into that namespace.

CATALOG_INDEX_IMAGE is empty by default on this branch, and the last clean periodic run (2074358014747348992, Jul 7) had no catalog index and passed with showcase-runtime 19 passed in 20.7m. It is always set on the RC and GA verification runs triggered through Gangway with --catalog-index-image, and both such runs on PR #5335 hung, with 648 Waiting for lock release lines.

main is not affected, but it is also not a useful comparison: it moved the runtime deployment into TypeScript (runtime-deploy.ts / ensureRuntimeDeployed()), which runs helm upgrade ... --wait --timeout 10m and therefore cannot start tests against a rollout in progress. This branch still has the bash flow.

Fix

Swap testing::run_tests for testing::check_and_test in the OCP Helm and OCP Operator runtime phases. It gates on /healthcheck before starting the tests, so the initial plugin install always completes before anything scales the deployment down, and it collects pod logs when tests fail. Every other phase on this branch already uses it.

Also align restartDeployment's internal budgets with the 10 minute timeout its callers set. 5m + 10s + 10m could not fit, so Playwright killed the worker mid-restart, the catch block never logged pod conditions or events, and the retry scaled the deployment down again on top of a rollout that was still starting. 2m + 10s + 7m fits.

Verification

Ran the full handle_ocp_nightly pipeline on an OCP 4.22 cluster with CATALOG_INDEX_IMAGE set, the configuration that reproduces the hang:

Phase Before After
showcase 36 passed 35 passed
showcase-rbac 17 passed 17 passed
showcase-runtime 0 of 19, killed at 100 min 19 passed (22.9m)
showcase-sanity-plugins never ran 9 passed (54.9s)

Waiting for lock release lines: 648 before, 0 after.

Follow-up

install-dynamic-plugins.py has no staleness check on that lock — wait_for_lock_release is an unbounded while True. This PR closes the window that opens it, but any hard kill (grace period expiry, eviction, OOM) can still orphan it. I have a fix for that and will open it separately, since it touches the product image rather than CI.

Longer term, this branch could adopt main's approach instead, where the runtime deploy owns its own --wait.

🤖 Generated with Claude Code

@openshift-ci
openshift-ci Bot requested review from josephca and teknaS47 September 3, 2026 19:57
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.60%. Comparing base (633f1a5) to head (42aa09c).

Additional details and impacted files
@@                Coverage Diff                @@
##           release-1.10    #5340       +/-   ##
=================================================
+ Coverage         41.03%   69.60%   +28.57%     
=================================================
  Files               121      111       -10     
  Lines              2220     4702     +2482     
  Branches            562      537       -25     
=================================================
+ Hits                911     3273     +2362     
- Misses             1303     1428      +125     
+ Partials              6        1        -5     
Flag Coverage Δ
install-dynamic-plugins 92.44% <ø> (?)
rhdh 38.81% <ø> (-2.23%) ⬇️

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 633f1a5...42aa09c. 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.

The showcase-runtime phase started Playwright as soon as `helm upgrade`
returned, without waiting for the deployment to become ready. The first
test in the showcase-runtime-db dependency project scales the deployment
to 0, so when the initial rollout is still running that scale-down kills
the install-dynamic-plugins init container mid-install.

That script holds a lock file on the dynamic-plugins-root PVC and
releases it from an atexit handler, which a hard kill skips. The lock
survives on the PVC and every pod created afterwards blocks forever on:

    ======= Waiting for lock release (file: /dynamic-plugins-root/install-dynamic-plugins.lock)...

Each Azure DB test then burns its full 10 minute timeout waiting for a
pod that can never become ready. Ten attempts consume 100 minutes, the
job hits the Prow timeout inside this phase, and showcase-sanity-plugins
never runs.

The race only opens wide enough to fire when the showcase-runtime
namespace also has to extract the catalog index and pull OCI plugins,
which happens when CATALOG_INDEX_IMAGE is set. That is empty on the
daily nightly, so it passes, but it is always set on the RC and GA
verification runs triggered through Gangway with --catalog-index-image.
Those runs are the reason the release branch nightlies exist, and they
have not reached the sanity plugin check at all.

Swap testing::run_tests for testing::check_and_test in both the OCP Helm
and OCP Operator runtime phases. It gates on /healthcheck before starting
the tests, so the initial plugin install always completes before anything
scales the deployment down, and it collects pod logs when tests fail.

Also align restartDeployment's internal budgets with the 10 minute
timeout its callers set: 5m + 10s + 10m could not fit, so Playwright
killed the worker mid-restart, the catch block never logged pod
conditions or events, and the retry scaled the deployment down again on
top of a rollout that was still starting. 2m + 10s + 7m fits.

Verified on an OCP 4.22 cluster by running the full handle_ocp_nightly
pipeline with CATALOG_INDEX_IMAGE set, the configuration that reproduces
the hang:

    showcase                 35 passed
    showcase-rbac            17 passed
    showcase-runtime         19 passed (22.9m, was 100m and never finished)
    showcase-sanity-plugins   9 passed (had never run)

Zero "Waiting for lock release" lines, against 648 in the failing run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gustavolira
gustavolira force-pushed the fix/e2e-runtime-readiness-gate branch from 5bf135d to 5818217 Compare September 3, 2026 20:08
@gustavolira

Copy link
Copy Markdown
Member Author

/test ?

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm-nightly

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: failure.

The full reasoning lives in the commit message and the PR body; the
inline comments only need to say why the call is shaped this way.
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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

@gustavolira

Copy link
Copy Markdown
Member Author

/test ?

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm-nightly

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

@gustavolira: 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 42aa09c link true /test e2e-ocp-helm
ci/prow/e2e-ocp-helm-nightly 42aa09c link false /test e2e-ocp-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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant