Repository navigation
fix(deploy): select desktop-backend's runtime image by container name - #12156
Merged
Merged
Conversation
…, not the empty single-container digest field status.imageDigest is the legacy single-container scalar in the Cloud Run v1 Revision API and comes back empty on any multi-container revision. The Managed Prometheus sidecar (#11998) made every desktop-backend candidate two-container, so the field went empty and image lineage verification has failed closed on every dev/prod candidate since. Extract the runtime image from the named desktop-backend-1 container instead, asserting exactly one match so the guard still fails closed on an ambiguous topology. Co-Authored-By: Claude Opus 5 <[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.
Summary
desktop_backend_auto_dev.ymlanddesktop_backend_prod.ymlsourced the desktop-backendcandidate's runtime image reference from
gcloud run revisions describe --format='value(status.imageDigest)'. That field is the legacy single-container scalarin the Cloud Run v1 Revision API —
RevisionStatushas no per-container digest map, soit is empty on any multi-container revision.
PR #11998 attached a Managed Prometheus
collectorsidecar to every desktop-backendcandidate, making them two-container revisions. Since then the field has come back
empty and the lineage guard has failed closed on every candidate with:
Dev desktop-backend has not deployed since 2026-08-22T19:26:45Z as a result.
The guard itself is correct — it should fail closed on an unproven image. The bug is
that its input went missing, not that the check is wrong.
Fix
Both workflows now extract the runtime image from
gcloud run revisions describe --format=jsonby selecting the container nameddesktop-backend-1, and assert thereis exactly one such container with a non-empty string image — so the check still fails
closed if the container topology becomes ambiguous again, instead of silently reading
an empty scalar.
This was verified against the live dev revision
desktop-backend-4b8636e55fcf-32744822554-1: the old field returned empty, the newextraction returns
gcr.io/based-hardware-dev/desktop-backend@sha256:b6c51555ebd7274728ccb79e0f2957fd1f6761d469aa51d5eb999d2debc6b706.This is not a tautology:
verify_desktop_backend_image_lineage.pyindependentlyderives the expected
linux/amd64child digest from the registry index and compares itagainst this container's spec image, so the real lineage property is still proven.
Test plan
.github/scripts/test_check_desktop_backend_release_policy.py— addedtest_neither_deploy_workflow_reads_the_legacy_single_container_digest_field(bothworkflows no longer reference the legacy field and both select
desktop-backend-1by name), plustest_runtime_image_filter_selects_desktop_backend_container_on_two_container_revisionand
test_runtime_image_filter_rejects_missing_or_duplicated_desktop_backend_container,which extract each workflow's actual
jqfilter and run it against realistictwo-container Revision JSON (
desktop-backend-1+collector,status.imageDigestabsent) to prove the extraction selects the right image and still fails closed on a
missing/duplicated/empty container.
actionlinton both modified workflow files..github/scripts/test_check_desktop_backend_release_policy.py(30/30 passing).
desktop_backend_auto_dev.ymlrun on the merge commit — watched end to endafter merge.
Product invariants affected
no serving-plane selection is touched. Naming it here because the guard exists to
prove the digest running in a given environment is the one actually built, which
underpins the continuity guarantee INV-DATA-1 depends on; the fix restores that proof
rather than weakening it.
Failure-Class: FC-config-target-identified-by-count-not-identity