Repository navigation
fix(deploy): publish backend release provenance from the deployed artifact - #11841
Merged
Merged
Conversation
…ifact deploy-cloudrun stamps a commit-sha label from GITHUB_SHA, the ref the run was triggered on, while a pinned deploy checks out and builds release_sha. The two differ on exactly the deploys that were deliberate, so the label names a commit that was never deployed. The 2026-08-19 production deploy of backend was dispatched with release_sha=2ebef0dc12. The revision name and image tag both read 2ebef0d, derived from the checked-out SHA and correct. The commit-sha label read b27420e, which was main HEAD at dispatch and was never built. Because commit-sha is the field an operator reads first, that produced two wrong conclusions in one incident: that production carried five commits it did not, and that a latency improvement came from a fix that was not deployed. backend now publishes OMI_BACKEND_RELEASE_SHA from the admitted release SHA, mirroring desktop-backend, which was unaffected precisely because it already did. A post-deploy step reads the marker back off the revision that was created and fails the deploy on mismatch, so an untrue provenance marker stops the release instead of outliving it. The misleading label cannot be suppressed from inside the action, so this adds a marker that is correct rather than correcting one that is structurally wrong. Co-Authored-By: Claude Opus 5 <[email protected]>
Git-on-my-level
force-pushed
the
fix/backend-release-sha-provenance
branch
from
August 19, 2026 03:04
86a05b7 to
e781359
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.
The defect
google-github-actions/deploy-cloudrunstamps acommit-shalabel fromGITHUB_SHA— the ref the workflow run was triggered on. A pinned deploy checks out and buildsrelease_sha. Those differ on exactly the deploys that were deliberate, so the label names a commit that was never deployed.Measured on the 2026-08-19 production deploy of
backend, dispatched withrelease_sha=2ebef0dc12:backend-2ebef0d-…2ebef0dc12git rev-parse --short=7 HEADafter checkoutgcr.io/…/backend:2ebef0d2ebef0dc12commit-shalabelb27420e01cGITHUB_SHAb27420e01cwasmainHEAD when the run was dispatched. It was never built and never deployed.Why this is worse than publishing nothing
commit-shais the first marker an operator reads to answer "what is running in production". During the 2026-08-19 incident it produced two reversals in one session: first the conclusion that production carried five commits it did not, then a latency improvement re-attributed to#11830— a fix that was not actually deployed. The truthful signals (revision-name suffix, image tag) sat unread beside it, because nobody reaches for an image digest when a field literally namedcommit-shais present.desktop-backendwas unaffected: it already publishesOMI_DESKTOP_BACKEND_RELEASE_SHAfrom its admitted source SHA, and reading that env var resolved the same incident in one query.The fix
Propagate the pattern that already works, and prove it:
OMI_BACKEND_RELEASE_SHAis published on thebackendCloud Run service frominputs.admitted_sha— therelease_shathatverify_backend_release_admission.pyvalidated as an ancestor ofmainand that the job checked out. True by construction.The misleading
commit-shalabel cannot be suppressed from inside the action, so this adds a marker that is correct rather than trying to correct one that is structurally wrong. The failure-class definition records that asymmetry so the next person does not read the label and re-derive the same wrong answer.Scope
backendonly, matching the service the incident touched.backend-sync,backend-sync-backfillandbackend-integrationdeploy through the same action and have the same gap — deliberately left for a follow-up rather than widening a production deploy path in one change. A per-service serving-SHA drift view is the natural next step, and it is only meaningful once the markers it reads are trustworthy.Verification
jqextraction expression validated against a live revision: returnsb27420e01cd7a48cecc7f75107895feb45dafcc9fromdesktop-backend-b27420e01cd7-32203390739-1make preflightgreenFailure-Class: new