fix: block single-arch images from reaching production#103
Merged
Conversation
A hand-pushed evcc/optimizer:latest carrying only a linux/arm64 manifest took production down: Container Apps nodes are amd64, found no matching manifest, and every replica looped in ImagePullBackOff. Deploy now inspects the tag before touching Azure and fails with an explicit error when linux/amd64 is missing. The index template covers multi-platform tags; single-platform tags publish a bare manifest, for which that template fails and the fallback reads the config blob. docker-build builds linux/amd64,linux/arm64. Buildx cannot load a manifest list into the local image store, so it pushes directly and the separate docker-push target is gone. Local iteration moves to docker-build-local, which is host-arch and never pushes; the default target uses it, so a bare make no longer publishes anything. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
evcc/optimizer:latestpushed by hand on 2026-07-24T13:26Z carried only alinux/arm64manifest. Azure Container Apps nodes are amd64, found no matching manifest, and every replica looped inImagePullBackOff—optimizer.evcc.iowas down untillatestwas rebuilt multi-arch. Every earlier tag wasamd64+arm64; there was noPublish Dockerrun that day, so the buildx path was bypassed.Nothing in the pipeline noticed.
deploy.ymldeployed the broken tag to 100% traffic a minute after the push.What
deploy.yml— inspects the tag before touching Azure, fails with an explicit error iflinux/amd64is absent. Multi-platform tags publish an index (.Manifest.Manifests); single-platform tags publish a bare manifest, for which that template exits 1 and the fallback reads the config blob.Makefile—docker-buildnow buildslinux/amd64,linux/arm64(override viaDOCKER_PLATFORMS).Behaviour changes worth reviewing
Buildx cannot load a manifest list into the local image store, so a multi-platform tag only exists once pushed. Consequences:
docker-buildpushes directly; the separatedocker-pushtarget is gone.docker-build-local— host arch,--load, never pushes.defaultusesdocker-build-local, so a baremakeno longer publishes anything (previously it built a local image that a latermake docker-pushcould ship single-arch — the exact outage path).Verification
Check logic run against the real registry, all three manifest shapes:
latest(multi-arch)linux/amd64 linux/arm64eacd365…(single-arch amd64)linux/amd64sha256:29a91f79…(the outage image)linux/arm64deploy.ymlparses as YAML with the step in the right position; Actions leaves the bare Go-template braces alone.make -nfordefault,docker-build,docker-runall expand as intended.Not covered: the check reads the tag at deploy time, so a tag overwritten between check and pull still slips through. Digest-pinned deploys would close that; out of scope here.
🤖 Generated with Claude Code