Repository navigation
fix(ci): cancelled image builds shipped yesterday's binary all day - #599
Merged
Merged
Conversation
No er-api image was built on 2026-11-05. The newest in ECR is from the previous evening, and four deploys reported SUCCESS rolling it. `images.yml` had `cancel-in-progress: true` on a group that, for a push, collapses to the ref alone — its own comment said so. The er-api build takes ~58 minutes, so in a burst of merges every build was cancelled by the next merge before it finished. The commits that DID complete were the ones where `detect` correctly skipped er-api because no Rust changed. The consequence is the part that matters: P12's metrics, P15's structured logging and P22's Rust-side allowlist gate were merged, green, and absent from the running binary. Confirmed by reading the live pod — "OTLP span export installed" is there and "OTLP metric export installed" is not, at the same log level from the same module, with the endpoint set. An image is the ARTIFACT a commit needs, not a check on it. Cancelling one does not save work; it removes the thing the deploy is supposed to roll, and the deploy then reuses whatever digest is newest and succeeds. That is the same reasoning `deploy.yml` already applies to itself — "Never cancel a deploy. See the header: cancelling one is how the previous arrangement silently skipped deploying at all." So pushes never cancel. `workflow_dispatch` still cancels its own group, which is keyed on the dispatched ref and never collides with a push. The cost is queued builds during a burst rather than cancelled ones: slow and correct, instead of fast and silently wrong. The deploy's stale-digest `::warning::` fired on every one of those four deploys, which is the only reason this was findable at all. It is a warning in a run summary, and nobody was looking there — including me, having added it. A deploy that refuses when the Rust tree moved in a commit with no image for it would turn this class into a red check instead of a warning; that is the follow-up, not this change. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
added a commit
that referenced
this pull request
Nov 5, 2026
…hip (#600) The stale-digest `::warning::` was not enough, and the evidence is specific: it fired on four deploys on 2026-11-05 — P12's metrics, P15's structured logging, P22's gate and P7's action header all merged, green, and absent from the running binary — and nobody read it, including the person who added it for exactly this failure. Something that must not be missed has to fail a check, not annotate one. So the digest step now REFUSES when the tree that builds an image actually moved between what is running and what is being deployed. The question is answerable because the reused digest carries the sha it was built from: `git diff <that sha>..<DEPLOY_SHA>` over the image's own source paths (`rust`, `Dockerfile`, `entities` for er-api; `frontend` for er-web) says whether this deploy would ship older code than it claims. No image tag and no source change is the legitimate case — #587's platform-only path, or a tree that genuinely did not move. No image tag WITH a source change is the bug, and it is now red. Validated against the real incident rather than a hypothetical: the running er-api was built from `8360868d`, main had moved to `17db1dde`, and 51 files under the watched paths changed between them. The guard fires. `fetch-depth: 0` on the checkout is load-bearing, not hygiene. The default of 1 clones a single commit, so the diff cannot resolve its left side and the guard would take its "cannot verify" branch on EVERY deploy — a check that always abstains, which is worse than no check because it looks like one. That flaw was in the first version of this change and caught before pushing. A tag that is not a commit in the checkout still only warns: that is a real state for a hand-pushed image, and refusing on it would block a legitimate deploy on a bookkeeping gap. Companion to #599, which stops the builds being cancelled in the first place. This is the guard for when something else swallows one. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Closed
4 tasks
athvin
pushed a commit
that referenced
this pull request
Nov 8, 2026
…es paths #587's push trigger was added to fix a cause that was misdiagnosed — the real reason #507 never deployed was cancel-in-progress, fixed by #599 and this file's queueing. The trigger never fired on a platform-only commit and only raced image builds on mixed commits, leaving noise-red deploy runs on main. Removed with PLATFORM_ONLY and the notice fork; the header now carries the correct diagnosis. deploy is reachable only through images, so images.yml's push paths gain scripts/ci/deploy-*.sh (the hole the removal would open) and deploy_reachability.rs holds all five surfaces in the required test context — both directions observed failing under mutation.
7 tasks done
athvin
pushed a commit
that referenced
this pull request
Nov 8, 2026
…es paths #587's push trigger was added to fix a cause that was misdiagnosed — the real reason #507 never deployed was cancel-in-progress, fixed by #599 and this file's queueing. The trigger never fired on a platform-only commit and only raced image builds on mixed commits, leaving noise-red deploy runs on main. Removed with PLATFORM_ONLY and the notice fork; the header now carries the correct diagnosis. deploy is reachable only through images, so images.yml's push paths gain scripts/ci/deploy-*.sh (the hole the removal would open) and deploy_reachability.rs holds all five surfaces in the required test context — both directions observed failing under mutation.
athvin
added a commit
that referenced
this pull request
Nov 8, 2026
…mages paths (#661) (#899) * wip: claim #661 — remove deploy.yml's misdiagnosed push trigger * fix(ci): remove deploy.yml's misdiagnosed push trigger; gate the images paths #587's push trigger was added to fix a cause that was misdiagnosed — the real reason #507 never deployed was cancel-in-progress, fixed by #599 and this file's queueing. The trigger never fired on a platform-only commit and only raced image builds on mixed commits, leaving noise-red deploy runs on main. Removed with PLATFORM_ONLY and the notice fork; the header now carries the correct diagnosis. deploy is reachable only through images, so images.yml's push paths gain scripts/ci/deploy-*.sh (the hole the removal would open) and deploy_reachability.rs holds all five surfaces in the required test context — both directions observed failing under mutation. * style: cargo fmt * style: clippy map_or * chore(skills): regenerate required-checks for the deploy condition * chore(skills): regenerate post-merge reference for the deploy trigger change --------- Co-authored-by: bmoore813 <[email protected]>
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.
What happened
No er-api image was built on 2026-11-05. The newest in ECR is from the
previous evening, and four deploys reported
successrolling it.0c455d4196d4f796d4dae45473421208images.ymlhadcancel-in-progress: trueon a group that, for a push,collapses to the ref alone — its own comment said so. The er-api build takes
~58 minutes, so in a burst of merges every build was cancelled by the next
merge before it could finish.
The consequence
P12's metrics, P15's structured logging and P22's Rust-side gate were merged,
green, and absent from the running binary.
Confirmed by reading the live pod rather than inferring it:
Same log level, same module, endpoint set. The binary predates P12.
The fix
An image is the artifact a commit needs, not a check on it. Cancelling one
does not save work — it removes the thing the deploy is supposed to roll, and
the deploy then reuses whatever digest is newest and succeeds.
That is the reasoning
deploy.ymlalready applies to itself:So pushes never cancel.
workflow_dispatchstill cancels its own group, whichis keyed on the dispatched ref and never collides with a push.
The cost is queued builds during a burst rather than cancelled ones: slow
and correct instead of fast and silently wrong.
How it was found, and the follow-up
The deploy's stale-digest
::warning::fired on every one of those fourdeploys. That is the only reason this was findable — and it is a warning in a
run summary, where nobody was looking, including me, having added it.
A deploy that refuses when the Rust tree moved in a commit with no image
for it would turn this class into a red check instead of a warning. That is the
follow-up, not this change.
🤖 Generated with Claude Code