compose/pkg
Nicolas De Loof b45991bf47 fix(reconcile): remove volumes_from consumers before volume recreation
servicesUsingVolume only matched services mounting the volume directly, so
a service reaching it through volumes_from was not stopped/removed before
RemoveVolume. Docker materializes the inherited mount on the consumer's
container, so its removal would fail with "volume in use". Compute the
transitive volumes_from closure so every container referencing the volume
is removed first. (network_mode/ipc/pid: service:x share namespaces, not
mounts, and are intentionally excluded.)

Also reassign the result of Labels.Add in createVolume: it mutates in
place only when the map is non-nil, so discarding the return would drop
the config-hash label for a volume with no CustomLabels.

Addresses review feedback: documents why observed.Containers is cleared
without touching the observedContainersByService hashing snapshot, and
strengthens the cascade tests to assert the full plan ordering.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-07-23 16:17:43 +02:00
..
api Fix grammar in Attestations field comment 2026-07-06 10:36:46 +02:00
bridge pkg/bridge: remove uses of go-connections 2026-02-11 12:32:37 +01:00
compose fix(reconcile): remove volumes_from consumers before volume recreation 2026-07-23 16:17:43 +02:00
dryrun chore(deps): github.com/docker/cli v29.6.0 2026-06-22 09:00:18 +02:00
e2e fix(oci): honor --insecure-registry when up re-loads the model 2026-07-21 16:24:34 +02:00
mocks chore(deps): github.com/docker/cli v29.6.0 2026-06-22 09:00:18 +02:00
remote chore: fix some comments to improve readability 2026-06-09 11:45:13 +02:00
utils fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00