Repository navigation
fix(ci): the dev deploy had become unreachable — give it its own workflow - #444
Merged
Merged
Conversation
athvin
force-pushed
the
bm/ci-deploy-unstarve
branch
from
November 3, 2026 07:00
c3fb34c to
9bdcf8d
Compare
…flow `images.yml` sets `cancel-in-progress: true`, and `deploy-dev` was `needs: [detect, er-api, er-web]` behind the ~58-minute er-api build. So any merge to main within an hour of the previous one cancelled the earlier run BEFORE its deploy job started. Measured 2026-11-03: four merges inside one hour produced three consecutive cancelled deploys, and `scripts/obs_up.sh` — the only installer for the span store, the collector and Fluent Bit — had therefore never run, despite the PR that added it having merged. Nothing reported it, because a cancelled run is not a failure. "Merged" did not mean "deployed", and five defects in those never-executed values survived review as a direct result. A job-level `concurrency` cannot fix this: the workflow-level cancel kills the job before it starts. So the deploy becomes its own workflow on `workflow_run`, with `cancel-in-progress: false` — deploys QUEUE instead of cancelling, and a merge landing mid-deploy waits its turn rather than aborting it half-applied. The property images.yml's comment claimed is NOT given up. It said the deploy lived there "so ordering is structural — a deploy cannot start before the images it deploys are pushed". `workflow_run` fires only on `completed` and the job additionally requires `conclusion == 'success'`, so that still holds; only the waiting moved outside the group that was cancelling it. Two things the split improves rather than merely preserves: - The old "Refuse to deploy a failed build" step inspected `needs.er-api.result` to tell "skipped" (that tree did not change — fine) from "failed" (do not deploy). The workflow conclusion already encodes exactly that distinction, and `cancelled` falls through to no deploy. - `DEPLOY_SHA` is `workflow_run.head_sha`, not `github.sha`. In a `workflow_run` workflow `github.sha` is the DEFAULT BRANCH TIP, not the commit that was built — using it would deploy whatever main happens to be now. That is the subtle way this kind of split goes wrong, so it is named. A cancelled `images` run still produces no deploy, which is correct rather than a remnant: a superseded build should not roll out, and the newest run — the one that was not cancelled — completes and deploys. `deploy dev (ci namespace)` is not a required status check (verified against branch protection), so moving it cannot block a PR. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
force-pushed
the
bm/ci-deploy-unstarve
branch
from
November 3, 2026 07:12
9bdcf8d to
cf0e606
Compare
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.
images.ymlsetscancel-in-progress: true, anddeploy-devwasneeds: [detect, er-api, er-web]behind the ~58-minute er-api build. So any merge to main within an hour of the previous one cancelled the earlier run before its deploy job started.Measured 2026-11-03: four merges inside one hour produced three consecutive cancelled deploys, and
scripts/obs_up.sh— the only installer for the span store, the collector and Fluent Bit — had therefore never run, despite the PR that added it having merged. Nothing reported it, because a cancelled run is not a failure."Merged" did not mean "deployed", and five defects in those never-executed values survived review as a direct result (#441).
Why it has to be a separate workflow
A job-level
concurrencycannot fix this — the workflow-level cancel kills the job before it ever starts. So the deploy becomes its own workflow onworkflow_run, withcancel-in-progress: false: deploys queue instead of cancelling, and a merge landing mid-deploy waits its turn rather than aborting it half-applied.The property the old comment claimed is not given up
images.ymlsaid the deploy lived there "so ordering is structural — a deploy cannot start before the images it deploys are pushed." That still holds:workflow_runfires only oncompleted, and the job additionally requiresconclusion == 'success'. Only the waiting moved outside the concurrency group that was cancelling it.A cancelled
imagesrun still produces no deploy — correct rather than a remnant of the old bug. A superseded build should not roll out, and the newest run, the one that was not cancelled, completes and deploys. The difference is that its deploy can no longer be killed by whatever merges next.Two things the split improves rather than merely preserves
needs.er-api.resultto distinguish skipped (that tree did not change — fine, reuse the existing digest) from failed (do not deploy). The workflow conclusion already encodes exactly that distinction: a rust-only commit skips er-web and the run is stillsuccess, while a failed build isfailure.cancelledandskippedfall through to no deploy, which is what they should mean.DEPLOY_SHAisworkflow_run.head_sha, notgithub.sha. In aworkflow_runworkflowgithub.shais the default branch tip, not the commit that was built — using it would deploy whatever main happens to be now. That is the subtle way this kind of split goes wrong, so it is named in the file.Checked rather than assumed
deploy dev (ci namespace)is not a required status check — verified against branch protection, so moving it cannot block a PR.ref:refs/heads/main(infra/terraform/modules/github-oidc). Aworkflow_runworkflow runs in the default-branch context, so the claim still matches; and if it ever stops matching,configure-aws-credentialsfails closed before anything is applied..claude/skills/ci-and-supply-chain/references/required-checks.mdis generated and tracked the move; regenerated and committed, andmake skills-checkpasses (it diffs againstHEAD, so the regen has to be committed to pass).uses:are SHA-pinned with trailing tag comments, per S9.One thing found on the way, deliberately not fixed here
scripts/ci/actionlint.shis orphaned. It shells out toscripts/actionlint.py, which the Python cutover (7cc444fd) deleted, so it cannot lint anything — and no workflow calls it. The S9 SHA-pin rule it was written to enforce has therefore been unenforced since that commit. Flagged rather than resurrected, because fixing it means choosing a replacement toolchain and that is not this change.🤖 Generated with Claude Code