Skip to content

fix(build): an image no longer carries the commit, so an unchanged image keeps its digest (#1378) - #1466

Merged
bpalermo merged 2 commits into
upgrade/1378-binary-build-idfrom
upgrade/1378-image-no-revision
Oct 8, 2026
Merged

bpalermo merged 2 commits into
upgrade/1378-binary-build-idfrom
upgrade/1378-image-no-revision

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Middle of a three-PR stack for #1378. The PR below it stops binaries from linking the commit; this one stops the image metadata from carrying it. With both, an image whose content did not change keeps its digest.

Part of #1378 (the publish side, signing and attesting only new digests, is a separate PR and is what closes it)

What

Every image carried the commit three times: the config label org.opencontainers.image.revision, a manifest annotation and an index annotation, each expanded from the workspace status with stamp = "force" (#837). Each is part of the JSON document it sits in, so each alone gave every image a new index digest with every commit. The charts pin index digests, so every deploy rolled every workload, the node proxy included.

Evidence

Measured on a developer machine with the real workspace status under --stamp, images built two at a time, on this branch (which includes the binary change):

Commits compared Index digests changed
differ only in README.md, on main 10 of 10
the same, binary change alone 10 of 10
the same, this branch 0 of 10
then mesh-dns-ready's source only 1: mesh-dns
then proxy-ready's source only 1: proxy-supervisor
then agent-ready's source only 1: agent
then identity-ready's source only 1: agent
then the registrar's main.go only 1: registrar
then the CNI plugin's main.go only 1: cni-install

The ten are agent, mesh-dns, proxy-supervisor, uds-csi, cni-install, controller, prober, registrar, l4echo, udsecho.

The chart. charts/aether packaged (plain and -<sha>) at the two README-only commits: the packages differ in Chart.yaml alone (version of the per-commit chart, appVersion). The seven in-repo repository + digest pins in the packaged values are identical between the two, and each equals the index digest built above (the proxy image is a static pin and is untouched). So a deployed chart finds its images exactly as before, by repository@sha256:… substituted at package time; no tag is involved. The per-commit chart version still followed the commit on a warm Bazel server (2.4.20-<sha> changed).

The tag. With a workspace status whose only commit-derived key was the volatile GIT_COMMIT, a second commit's build kept the first commit's dev-<sha> tag: Bazel does not re-run an action for a volatile key. With a STABLE_ key that changes, the tag follows. That is why STABLE_GIT_COMMIT stays although nothing in an image reads it.

Nothing in the repository reads the removed label: no script, workflow or test refers to image.revision.

What an operator loses, and what replaces it

docker inspect / crane config no longer shows the commit. The commit is bound to a digest from outside it: the dev-<full sha> tag (commit to digest), the cosign certificate and the provenance attestation (digest to commit). docs/verifying-releases.md, "Which commit built this digest", has the commands.

The first deploy from a commit that has this rolls everything one last time (every digest changes once). Plan it as a full roll.

Merge order against the publish PR

The publish change (#1474) has merged: a digest is signed and attested once, by the run that first pushed it, and an unchanged digest is verified against the workflow only. That was the one ordering concern (an unchanged digest collecting an attestation per commit, against a verify step that fetched 30), so this stack has no ordering constraint left. This PR is rebased onto it.

Not verified

  • Anything against a registry: the push of a tag onto an unchanged digest is the first thing the next publish run will exercise.
  • A cold CI runner with the remote cache (all measurements are warm, local).
  • The roll table in the runbook (which workloads roll for which change) is derived from the chart and the digests above, not from a cluster.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

@bpalermo
bpalermo added this pull request to stack #1468 October 8, 2026 20:11
Copilot AI balanced review requested due to automatic review settings October 8, 2026 20:59
@bpalermo
bpalermo force-pushed the upgrade/1378-image-no-revision branch from f52abe4 to e40a5cc Compare October 8, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Documentation incorrectly includes the separately stamped proxy image and conflicts with the required publish-workflow semantics.

4 open findings
What changed in this PR

Removes commit-derived OCI metadata so unchanged Go images retain stable digests across commits.

Changes:

  • Removes revision labels, annotations, and forced stamping.
  • Uses STABLE_GIT_COMMIT for per-commit tags.
  • Documents digest stability and release verification.
File Description
bazel/​img/​go_multi_arch_image.bzl Removes commit-dependent image metadata.
bazel/​workspace_status.sh Preserves stable commit input for artifact naming.
docs/​runbook.md Documents deployment roll behavior.
docs/​verifying-releases.md Explains digest-to-commit verification.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/runbook.md Resolved
Comment thread docs/verifying-releases.md Resolved
Comment thread docs/verifying-releases.md Resolved
Comment thread bazel/workspace_status.sh Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/runbook.md Resolved
Copilot AI balanced review requested due to automatic review settings October 8, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The release-critical registry and cold remote-cache paths remain unverified despite the implementation appearing consistent.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

bpalermo and others added 2 commits October 8, 2026 19:50
…age keeps its digest (#1378)

Every image carried the commit three times: as the config label
`org.opencontainers.image.revision`, as a manifest annotation and as an index
annotation, each expanded from the workspace status with `stamp = "force"`
(#837). Each is part of the JSON document it sits in, so every image got a new
index digest with every commit. The charts pin index digests, so every deploy
rolled every workload, the node proxy included.

The label, both annotations and both `stamp = "force"` are gone. The image
rules take no workspace-status input any more, so the config, the manifest and
the index are the same in every build configuration and at every commit.
`org.opencontainers.image.source` stays: it is a constant.

The commit still names a build, outside the digest: the per-commit tag
`dev-<sha>`, the signature's certificate and the provenance attestation. The
tag now reads `STABLE_GIT_COMMIT`, and the key stays in the workspace status:
once the image does not change with the commit, a STABLE_ key is the only
thing that re-expands the tag.

Measured, with the real workspace status under `--stamp`, on this change
stacked on the binary build-ID change:

- two commits that differ only in README.md: 0 of 10 index digests changed
  (10 of 10 on main, and 10 of 10 with the binary change alone);
- then one source file at a time: mesh-dns-ready changed only the mesh-dns
  image, proxy-ready only proxy-supervisor, agent-ready and identity-ready
  only agent, the registrar only registrar, the CNI plugin only cni-install;
- the aether chart packaged at the two README-only commits differs in
  Chart.yaml alone (version, appVersion); the eight `repository` + `digest`
  pins in its values are identical.

The first deploy from a commit that has this rolls everything one last time.

Part of #1378

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…roxy image still does (#1378)

Review of the image change. The runbook, docs/verifying-releases.md and the
comment in bazel/workspace_status.sh said no image and no binary carries the
commit. That holds for the Go images this workspace builds. The aether-proxy
image is built in the nested proxy/ workspace by its own release workflow and
still carries the aether commit: `org.opencontainers.image.revision` as label
and annotation (proxy/BUILD.bazel:61-96, proxy/bazel/image_metadata.sh:54) and
Envoy's own version linkstamp (proxy/README.md:175-185). The chart pins that
image statically, so it costs no roll.

docs/verifying-releases.md also said the label "is going away"; for the Go
images it is gone with this change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Copilot AI balanced review requested due to automatic review settings October 8, 2026 22:51
@bpalermo
bpalermo force-pushed the upgrade/1378-image-no-revision branch from 5af6bd2 to 6b3c186 Compare October 8, 2026 22:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation consistently removes commit-sensitive image inputs while retaining commit-addressable publishing metadata.

0 open findings

🧠 Review effort: Balanced

@bpalermo
bpalermo merged commit 0418bb1 into main Oct 8, 2026
31 checks passed
@bpalermo
bpalermo deleted the upgrade/1378-image-no-revision branch October 8, 2026 23:08
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