ci: wait for in-flight mirror runs; consolidate release gating on is_release - #1599
Draft
nebasuke wants to merge 3 commits into
Draft
ci: wait for in-flight mirror runs; consolidate release gating on is_release#1599nebasuke wants to merge 3 commits into
nebasuke wants to merge 3 commits into
Conversation
|
nebasuke
temporarily deployed
to
github-action-benchmark
August 3, 2026 17:56 — with
GitHub Actions
Inactive
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1599 +/- ##
==========================================
- Coverage 79.89% 79.88% -0.01%
==========================================
Files 452 452
Lines 78956 78956
Branches 78956 78956
==========================================
- Hits 63078 63074 -4
- Misses 13697 13699 +2
- Partials 2181 2183 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nebasuke
temporarily deployed
to
github-action-benchmark
August 3, 2026 18:11 — with
GitHub Actions
Inactive
nebasuke
temporarily deployed
to
github-action-benchmark
August 3, 2026 18:11 — with
GitHub Actions
Inactive
nebasuke
temporarily deployed
to
github-action-benchmark
August 5, 2026 12:33 — with
GitHub Actions
Inactive
nebasuke
temporarily deployed
to
github-action-benchmark
August 5, 2026 12:37 — with
GitHub Actions
Inactive
nebasuke
temporarily deployed
to
github-action-benchmark
August 5, 2026 12:37 — with
GitHub Actions
Inactive
On PRs that touch mirror-docker-images.yml, the mirror run and the edr-npm-release.yml docker jobs start in parallel, so the docker jobs could race ahead and fail their pulls with 'manifest unknown', needing a manual re-run once the mirror was green. The select-node-image action now polls the mirror workflow run for the same head SHA (when one exists) until it completes, same technique the HH3 regression benchmark uses to wait for edr-ci.yml. Closes #1593
check_commit's stringly tag output gated five different steps and jobs with three different expression shapes; a mistake in any of them would silently put a release build on the unsafe path (warm poisonable cache, mirror image in the supply chain). Derive an explicit is_release output from tag in one place, gate every consumer with the same expression, and prove the cold-build invariant at runtime: release builds now fail loudly if a cargo cache was restored. tag itself remains only as the npm dist-tag for publish. Raised by @anaPerezGhiglia in the #1587 review (#1593).
The wait step could hard-fail all five docker job families on any
non-success mirror conclusion — including fork PRs, whose mirror run
skips itself by design and concludes 'skipped', and a failed weekly
re-sync sharing main's head SHA. The pull itself is the authoritative
loud failure for a genuinely missing tag ('manifest unknown'), so
warn and proceed on non-success or timeout instead of failing.
Also from review: reword the cold-build assert comment (it's a
tripwire against future edits to the cache gate, not a proof of the
is_release derivation), log the non-release decision in check_commit
instead of falling through silently, mention the wait in the action
description, and trim reviewer-facing comments.
nebasuke
force-pushed
the
ci/mirror-wait
branch
from
August 6, 2026 08:30
1e8df4b to
b63ac37
Compare
nebasuke
temporarily deployed
to
github-action-benchmark
August 6, 2026 08:30 — with
GitHub Actions
Inactive
nebasuke
temporarily deployed
to
github-action-benchmark
August 6, 2026 08:32 — with
GitHub Actions
Inactive
nebasuke
temporarily deployed
to
github-action-benchmark
August 6, 2026 08:32 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1593 — both follow-ups from the #1587 review.
Wait for the mirror workflow (@Wodann)
On PRs that touch
mirror-docker-images.yml(e.g. adding a node tag), the mirror run and theedr-npm-release.ymldocker jobs start in parallel, so the docker jobs could race ahead, fail their pulls withmanifest unknown, and need a manual re-run once the mirror job was green.The
select-node-imageaction now waits for themirror-docker-images.ymlrun for the same head SHA to complete — the same technique the HH3 regression benchmark workflow uses to wait foredr-ci.yml(waitForEdrCiin.github/scripts/resolve-regression-trigger.cjs). Two adaptations: no mirror run for the SHA means there is nothing to wait for (the common case — most PRs don't touch the mirror workflow), and the wait is best-effort — it never fails the job. On a non-success conclusion (a fork PR's mirror run skips itself by design and concludesskipped; a failed weekly re-sync can share main's head SHA) or on timeout it proceeds with a warning, because the pull itself is the authoritative loud failure for a genuinely missing tag. Release runs skip the step entirely; they don't use the mirror.actions: readadded on the five docker-pulling jobs so the step can list workflow runs.mirror-docker-images.yml(comment update) also triggers a mirror run on this PR, exercising the wait against a concurrent mirror run in real CI.Consolidate the release/non-release gating (@anaPerezGhiglia)
check_commit's stringlytagoutput gated five different steps and jobs with three different expression shapes (tag == '',tag != '', non-emptyrelease-taginput); a mistake in any of them would silently put a release build on the unsafe path — warm poisonable cache, mirror image in the supply chain — with nothing failing. Now:check_commitexposes an explicitis_releaseoutput, derived fromtagin one place so the two can't diverge; every consumer gates on the same expression.tagitself remains only as the npm dist-tag (next/latest) inpublish, andcheck_commitnow logs its decision on every path instead of falling through silently.select-node-imagetakesis-releaseinstead of the dist-tag it had no business knowing.target/exists after the (supposedly skipped) cache step, so removing or breaking that gate fails the release instead of silently shipping binaries built from a warm cache. (A brokenis_releasederivation is fail-closed separately:publishgates on the same value, so nothing ships.)Docs
Book mirror chapter: the "benign, re-run manually" paragraph now describes the wait and its best-effort semantics.
The issue originally recorded digest-pinning as follow-up 2; that was superseded within #1587 itself (release runs pull the official image straight from Docker Hub) and the issue has been updated to record Ana's actual remaining concern.
Validation
gh/date(all proceed with at most a warning).Stacked follow-up
#1600 builds on this branch: it splits the workflow into a reusable build pipeline and thin CI/release callers, removing the per-job
is_releaseguards entirely.