compose/pkg
Nicolas De Loof 79cd9f0ff7 fix(reconcile): leave a drifted network or volume alone while a service outside the selection still uses it
A project narrowed with WithSelectedServices (watch's rebuild, which
this PR moves to a narrowed Create phase, and `up`/`scale --no-deps`)
keeps every network and volume of the model but moves the services left
out to DisabledServices. The reconciler looked for the consumers of a
resource in project.Services only, so a drifted network or volume used
by a disabled service looked unused: the plan removed it without
detaching that service's container, and the removal failed with
"in use". For a volume, the user was first asked to confirm a
data-destroying recreation that could not succeed.

A same-name drifted network or volume that a disabled service still
holds through a live container is now kept as is, with a warning, and no
prompt is shown. A disabled service without a live container does not
block anything, and a rename is unaffected (it never removes the live
resource).

Also correct the comment in rebuild, which claimed narrowing left the
convergence of networks and volumes unaffected.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-15 17:04:18 +02:00
..
api feat(push): add --ignore-missing to skip images not available locally 2026-10-14 21:34:38 +02:00
bridge build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
compose fix(reconcile): leave a drifted network or volume alone while a service outside the selection still uses it 2026-10-15 17:04:18 +02:00
dryrun feat(registry): use the Docker Desktop Hub session for Docker Hub credentials 2026-10-07 14:24:28 +02:00
e2e test(e2e): lock --wait-timeout on a depends_on service_healthy dependency 2026-10-15 14:52:20 +02:00
mocks refactor(api): regenerate mocks for the split Compose interfaces 2026-10-12 12:03:29 +02:00
remote docs(registry): trim comments 2026-10-07 14:24:28 +02:00
utils
watch golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00