Skip to content

Warn when a destination's compose recreates unchanged containers - #38

Merged
levresearch merged 1 commit into
mainfrom
feat/compose-version-preflight
Oct 24, 2026
Merged

levresearch merged 1 commit into
mainfrom
feat/compose-version-preflight

Conversation

@levresearch

Copy link
Copy Markdown
Owner

Before compose 5.5.0, compose decided whether a container was stale by its image id. BuildKit attaches a provenance attestation with a build time to every image, so under the containerd image store every rebuild gets a new id, and redeploying a commit recreated every container in place even when nothing changed. compose 5.5.0 (docker/compose#14011, docker/compose#14041) compares the image's content instead.

Preflight now reads docker compose version --short on the destination and warns below 5.5.0, naming the host and the version. An unreadable version gives no warning. The README lists compose 5.5.0 as the server requirement.

Found on a destination running compose 5.0.0: a same-commit redeploy restarted every service. After upgrading it to 5.6.1, a throwaway project built on that destination kept its containers across a same-commit redeploy while provenance stayed attached, and a real change still cut over normally.

Tested: unit tests for version parsing (v-prefix, build suffixes, unreadable versions) and for reading it from the destination; full suite passes.

compose before 5.5.0 decides a container is stale by its image id, and
buildkit's provenance attestation gives every build a new one under the
containerd image store, so redeploying a commit restarted services that had
not changed. compose 5.5.0 compares the image's content instead. Preflight
now reads the destination's compose version and warns below 5.5.0.
@levresearch
levresearch merged commit a4b2f0e into main Oct 24, 2026
4 checks passed
@levresearch
levresearch deleted the feat/compose-version-preflight branch October 24, 2026 13:24
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.

1 participant