deploy: build without provenance attestations so cached rebuilds keep their id #353
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!353
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/deploy-stable-build-ids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
just deploy --dry-runon a freshly synced trunk, with nothing changed:The dry run builds
build:images first so a rebuilt image is visible to compose, but BuildKit attaches a fresh provenance attestation to every build, so a fully cached rebuild still gets a new manifest digest. Compose compares image ids, sees a new one, and reports the service changed. A real deploy then recreates those containers every run for no reason, and the drift list is never trustworthy for local builds. This is also why #306's first run found "stale" local images.Measured on
media-metadatawith the layer cache warm:eab260da…dc971215…BUILDX_NO_DEFAULT_ATTESTATIONS=1a57c5ddd…a57c5ddd…Fix
deploy.pysetsBUILDX_NO_DEFAULT_ATTESTATIONS=1in its own environment, so both of its builds (the dry-runbuild -qand the deploy'sup --build) produce reproducible ids. Nothing in the stack consumes the attestations; the image scan reads the image itself.Verification
On the live stack:
just recreateof metadata, knock-web and knock-worker onto attestation-free images, thenBUILDX_NO_DEFAULT_ATTESTATIONS=1 python3 _helper/deploy.py --dry-runtwice in a row:All three containers healthy afterwards. Live already runs images with stable ids, so after merge the first dry run is quiet too.
🤖 Generated with Claude Code