Repository navigation
feat(ci): decide e2e-ocp-helm runs after the PR image is published - #5764
subhashkhileri wants to merge 14 commits into
Conversation
The e2e-ocp-helm Prow check claims an ephemeral OCP cluster on every run. Between 2026-09-16 and 2026-11-02 it claimed 792 clusters and about 43% of those claims were avoidable: Renovate rebases, rhdh-bot [skip-e2e] PRs that claimed and then exited, PRs that only touched docs, tooling, the cluster-free harness or CI for other platforms, and runs that held a cluster while waiting for the PR image. Add a "Decide e2e-ocp-helm" job to pr-podman-push.yaml. It runs after the PR image is published and either has rhdh-bot comment /test e2e-ocp-helm or sets the required ci/prow/e2e-ocp-helm status itself (skip, wait for a manual /test, or fail with the reason). The rules and decision logic are TypeScript run directly by Node from .nvmrc, with unit tests and no install step. The gate only reports until the E2E_GATE_MODE repository variable is set to "enforce", which happens together with the openshift/release change that makes the Prow job manual-only. Refs: RHIDP-16423 Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5764 +/- ##
==========================================
- Coverage 78.65% 72.94% -5.71%
==========================================
Files 67 60 -7
Lines 726 573 -153
Branches 100 83 -17
==========================================
- Hits 571 418 -153
Misses 154 154
Partials 1 1
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Prow rejects /override from github-actions[bot] as unauthorized, so the line never had an effect and only added a rejection comment to every bot PR. Bot PRs that need no cluster are now handled by the e2e-ocp-helm gate. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
|
The container image build workflow finished with status: |
Prow never auto-ran presubmits on drafts, but the image build runs on them, so the gate would have posted /test on every draft push. Drafts now get a pending status, and ready_for_review re-runs the image build and the gate. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
- Drop the explicit checkout ref. In a workflow_run job checkout already uses the default branch head; the github.event expression made Sonar read it as a fork checkout. - Strip control characters from API values before logging them. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
|
The container image build workflow finished with status: |
- Never overwrite a ci/prow/e2e-ocp-helm status Prow already reported, and never request a second run for a commit Prow has tested. - Only count earlier /test requests posted by rhdh-bot, so a spoofed marker cannot suppress the run. - Classify a renamed file under its old path too. - Check image build/publish failures before Renovate and untrusted "comment /test" answers, which would wait 60 minutes for no image. - Ignore cancelled image builds; the newer build decides. - Trust private redhat-developer members, as Prow does. - Match the [skip-build] fallback directories to the Prow step's list. - Keep cluster/gke/gcloud.sh and cluster/eks/aws.sh running: cleanup.sh sources them in the OCP Helm job. - Set an error status if the gate fails or cannot find the PR, so Tide never waits on a status that will not arrive. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
Drop the ready_for_review trigger from pr-build-image.yaml. It rebuilt the image only to re-run the gate, and pull_request reads the workflow from the base branch, so every release branch would need it too. Drafts still wait; the next push or a manual /test starts the check. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
The gate acts as soon as it merges. Until openshift/release stops auto-running e2e-ocp-helm, Prow reports on each push long before the gate runs, and the gate leaves Prow results alone, so there is nothing to stage. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
|
The container image build workflow finished with status: |
- Report gate errors from gate.mts, reusing prowStatus, instead of a bash step that duplicated the context and bot login. - Check for an existing Prow result before fetching files and membership; fetch those two in parallel. - Skip cancelled builds in the job condition instead of starting a runner. - Share request headers, trim duplicated comments, merge overlapping tests. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
- Validate the org and login before building the membership URL. - Parse the Link header without a backtracking regex. - Use top-level await instead of a promise chain. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
|
The container image build workflow finished with status: |
Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
|
The container image build workflow finished with status: |
Record why each part of the gate works the way it does, and fold the scattered explanation paragraphs into one table. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
- Mark skip statuses with [prow:skip-retest]. Tide only treats a required job as passed when a ProwJob exists or the success status carries this sentinel, so without it Tide started the job itself before merge. - Run for install-methods/operator.sh: gcloud.sh sources it in every job. - Take PUBLISH_RESULT from the push step, not the whole job, so a failed comment step after a successful push no longer fails the check. - Ignore the gate's own statuses when looking for a Prow result, and check again just before writing, so a Prow result is never overwritten. - Report cancelled builds for the current head instead of staying silent. - Set the error status from a final gh step, so it also covers failures in checkout or Node setup. - Never skip when GitHub truncates the file list (3000 files). - Set a pending status before requesting /test, so a dropped request shows on the PR. - Treat unexpected org membership answers as errors, not "untrusted". - Reword the skipped-image failure message. Assisted-by: Claude Code Co-Authored-By: Claude Code Signed-off-by: Subhash Khileri <skhileri@redhat.com>
|
|
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |
|
Superseded by #5778 (pipeline controller approach, with openshift/release#88206). Closing. |



Summary
The mandatory
e2e-ocp-helmProw check claims an ephemeral OCP cluster from the Hive pool on every run. Between 2026-09-16 and 2026-11-02 it claimed 792 clusters, and about 340 of those (43%) were avoidable:[skip-e2e]PRs claimed a cluster, then exited 0This PR adds a Decide e2e-ocp-helm job to
pr-podman-push.yaml. It runs after the PR image is published and decides:The scripts are TypeScript run directly by Node 24 (
.nvmrc) with type stripping, so the job with secrets has noyarn installstep.Companion change: openshift/release#88148 makes the Prow job manual-only and keeps it required. Merge this PR first: until #88148 lands, Prow still reports on every push before the gate runs, and the gate leaves Prow results alone.
Design decisions
ci/prow/e2e-ocp-helmon a commit, the gate never overwrites it or requests a second run.fail, not "comment /test" (which would wait 60 min for nothing).ready_for_reviewwould rebuild the image and need the trigger backported to every release branch. About 2 PRs a week on main need a/testor push after marking ready instead./testok-to-test. Only then does rhdh-bot post/test.[skip-build]fallback mirrors Prownext-image fallback; other changes with no image fail.errorwith a link (unless Prow already reported), so Tide never waits on a missing status.workflow_runruns frommain, somaindecides for every release branch.rpms.lock.yamlstays skippedskip_if_only_changed; the bot's lockfile PRs are[skip-build], so there is no image to test.Which issue(s) does this PR fix
Evidence
skip_if_only_changedskipped 0 runs in that window, and\\.mdc/\\.toml$in it never match.run 431 / wait 240 / skip 121. Every skip agrees with a manual per-file review, except chore: update release-2.1 to ubi10/nodejs-24:10.2-1791496854 from ubi10/nodejs-24:10.2-1791406140 [skip-build] [skip-e2e] #5637, a rhdh-bot[skip-e2e]PR that the old step ran only because its auto-approval had not landed yet.Testing
node --test "scripts/e2e-gate/*.test.mts": 74 passed. The new E2E OCP Gate Tests workflow runs the same command.tsc --noEmit --stricton the gate scripts: clean.actionlinton the changed workflows: no new findings.workflow_runjobs only run frommain, so the gate can't run from this PR.Merge Danger
Door: two-way. Blast radius: PR checks
How to revert
Revert this PR and openshift/release#88148.
PR acceptance criteria
scripts/e2e-gate/README.md,docs/e2e-tests/CI.md)How to test changes / Special notes to the reviewer
RHDH_BOT_TOKENsecret, because rhdh-bot is an org member and Prow accepts its/test. Its comments bypass/ok-to-test, so the gate posts/testonly for trusted authors (see Design decisions). Only rhdh-bot's own marker comment counts as an earlier request.statuses: writeonGITHUB_TOKEN.pr-build-image.yamlis unchanged.auto-approve-bot-prs.yamlno longer adds/override ci/prow/e2e-ocp-helmto its approval review. Prow rejects/overridefromgithub-actions[bot]as unauthorized, so the line never took effect: it only produced a rejection comment on every bot PR (152 since 2026-09-15). The gate now handles bot PRs that need no cluster.Assisted-by: Claude Code