deploy: pull missing images before the dry run, list new containers #354
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!354
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/deploy-pull-before-dry-run"
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-runafter merging a Renovate digest bump, before anything pulled the new image (#348):Compose's dry run only pretends to pull, then its simulated recreate asks the daemon for the image and gets nothing. The one case the dry run exists for after a Renovate merge is the one that errors. Reproduced on the live infra stack with an override file pointing
authelia-postgresat an existing but unpulledpostgres:18.4-alpinedigest: same error, same place.A second gap turned up while testing: compose 5.5 prints
Container x Creatingfor a container that does not exist yet, so the regex'sCreatebranch never matched and a brand-new service was never listed.Fix
Two commits:
stack_changesrunsdocker compose pull -q --policy missing --ignore-buildablefor each stack before its dry run, next to the existingbuild -q.--policy missingfetches exactly the imagesupwould and nothing else, so a floating tag is not upgraded behind the deploy's back, and a pull changes no live state. A failed pull is reported like a failed build, with the stack and compose's stderr.Creatinginstead ofCreate, so new containers show as(new).Maintenance.md's
just deployrow mentions the pull.Verification
['t348-t348-1 (changed)', 't348-t348b-1 (new)'], and the new digest is local afterwards. Before the fix the same stack returned[].Skipped Image is already present locally), then the dry run listsContainer authelia-postgres Recreateinstead of failing.just deploy --dry-runon the live tree:No changed stacks to deploy.in 14 s.Test containers, network and the three pulled images were removed afterwards.
🤖 Generated with Claude Code