Repository navigation
fix(release): pin *_IMAGE env to the SHA tag, not the digest - #118
Merged
Merged
Conversation
The release wrote the immutable digest (repo@sha256:...) into the deployment
*_IMAGE env var, which the next build_publish's 'docker compose config' +
'buildx bake' resolved as a build tag — and a digest cannot be a build tag
('build tag cannot contain a digest').
Now the release writes the SHA tag (ref) into the env var and keeps the digest
only in the managed image override, so the running container stays pinned to
the exact digest while the next build derives a valid tag.
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.
What
The release endpoint wrote the immutable digest (
repo@sha256:...) into the deployment's*_IMAGEenv var, which the nextbuild_publishthen resolved throughdocker compose config+docker buildx bakeas a build tag — and a digest cannot be a build tag.Why
The release half intentionally pins the runtime to an immutable digest (via the managed image override). But it also synced that digest into the
*_IMAGEenv var that the source Compose substitutes forimage:. On the following build, that digest became the build tag and broke the build.Change
release/route.ts— write the SHA tag (ref) into the*_IMAGEenv var, keeping the digest only in the managed override pin.agent-operation-worker.cjs— forward the build'sref(tag) alongsidedigestto the release endpoint (it previously dropped it).The running container stays pinned to the exact digest via the override; the env var now carries a buildable tag.
Validation
npx tsc --noEmit— cleannode --check scripts/agent-operation-worker.cjs— cleannpx vitest run— 502/502 passing