Skip to content

fix(ci): a platform-only change merges green and never deploys - #587

Merged
athvin merged 2 commits into
mainfrom
bm/ci-deploy-platform-only
Nov 5, 2026
Merged

athvin merged 2 commits into
mainfrom
bm/ci-deploy-platform-only

Conversation

@athvin

@athvin athvin commented Nov 5, 2026

Copy link
Copy Markdown
Owner

The gap

deploy.yml fires only on workflow_run: [images], and images only runs when
something that goes into an image changes. So a commit touching just
infra/k8s/** builds nothing, images never runs, and deploy never fires —
while obs_up.sh, which applies those values, lives inside the deploy job.

A change that merges green and is simply never applied.

Found by merging the collector's PII attribute allowlist (#507): committed,
green, and absent from the cluster. Masked until then because every earlier
observability change rode along with a Rust commit that did build an image and
carried the YAML with it.

The fix

push to main, filtered to infra/k8s/** and scripts/obs_up.sh.

A paths: filter is safe here and nowhere near the gates. deploy is not a
required status check — the required set is the twelve rust, frontend and infra
contexts — so a filtered run that never reports blocks nothing. On rust.yml or
frontend.yml the same filter would block every PR forever, which is why
those use the detect-job pattern. The header says so, because the two cases
look identical and are opposite.

DEPLOY_SHA falls back to github.sha, which on the push path is the
pushed commit rather than a moving branch tip — correct here for the same reason
it is wrong on the workflow_run path. The hazard that comment warns about is
reading a branch tip, not the variable.

One subtlety worth the extra lines

A platform-only commit has no image of its own, so the digest step reuses the
newest in ECR. That is already handled — but it emitted a ::warning:: whose
whole purpose is catching a build that should have run and did not.

Firing it on every platform-only deploy would teach the reader to ignore the
annotation and cost exactly that signal. So the expected case is now a
::notice:: and the suspicious one stays a ::warning::.

Related

Companion to #510, which fixed the broken config this gap hid, and added the
collector rollout status that makes a rejected config fail the deploy red
instead of green.

🤖 Generated with Claude Code

bmoore813 and others added 2 commits November 5, 2026 11:15
`deploy.yml` fires only on `workflow_run: [images]`, and `images` only runs
when something that goes INTO an image changes. So a commit touching just
`infra/k8s/**` builds nothing, `images` never runs, and this workflow never
fires — while `obs_up.sh`, which applies those values, lives inside the deploy
job. The result is a change that merges green and is simply never applied.

Found by merging the collector's PII attribute allowlist (#507): committed,
green, and absent from the cluster. Masked until then because every earlier
observability change rode along with a Rust commit that did build an image,
which carried the YAML with it.

So `push` to main, filtered to `infra/k8s/**` and `scripts/obs_up.sh`.

A `paths:` filter is safe HERE and nowhere near the gates. `deploy` is not a
required status check — the required set is the twelve rust, frontend and
infra contexts — so a filtered run that never reports blocks nothing. On
`rust.yml` or `frontend.yml` the same filter would block every PR forever,
which is why those use the `detect`-job pattern instead. The header says so,
because the two cases look identical and are opposite.

`DEPLOY_SHA` falls back to `github.sha`, which on the `push` path IS the
pushed commit rather than a moving branch tip — correct here for the same
reason it is wrong on the `workflow_run` path. The hazard that comment warns
about is reading a branch tip, not the variable.

One subtlety: a platform-only commit has no image of its own, so the digest
step reuses the newest in ECR. That is already handled, but it emitted a
`::warning::` whose whole purpose is catching a build that should have run and
did not. Firing it on every platform-only deploy would teach the reader to
ignore the annotation and cost exactly that signal, so the expected case is
now a `::notice::` and the suspicious one stays a warning.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`required-checks.md` tabulates each job's `if:` condition, so adding the
`push` path to deploy-dev is a two-file change by design — the reference
cannot drift from what the workflows actually gate on.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin merged commit 7342120 into main Nov 5, 2026
36 checks passed
@athvin
athvin deleted the bm/ci-deploy-platform-only branch November 5, 2026 16:20
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]>
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 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]>
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.

2 participants