compose/pkg
hiroto.toyoda 20717bab83 fix(down): spare dangling images of orphaned services, like their tagged image
`down --rmi` removed every dangling image for the project unconditionally,
while its tagged-image counterpart (ImagesToPrune) already skips a service
no longer in the project unless --remove-orphans is set. `down --rmi local`
on a project with an orphaned service therefore kept the tagged image but
deleted its dangling ones - an inconsistent result for one command.

Extract the "list a project's dangling images, remove what a keep predicate
doesn't spare, tolerate individual failures" logic - which down.go and
watch.go's pruneDanglingImagesOnRebuild had each partially and divergently
implemented - into one shared composeService.removeDanglingImages,
parallelized via errgroup like the rest of the codebase's bulk removals.
down.go's keep now mirrors ImagesToPrune's own RemoveOrphans/GetService
check; watch.go keeps its existing built-IDs check, behavior unchanged.

The removal fan-out now also honors --parallel via eg.SetLimit(s.maxConcurrency),
matching push.go/pull.go, instead of always running unbounded. Fixed
TestWatch_Sync's composeService{} literal to set maxConcurrency: -1
(NewComposeService's own default) - the zero value means "allow zero
concurrent goroutines" to errgroup, not "unlimited", and was silently
relying on maxConcurrency being unused before this change.

Signed-off-by: hiroto.toyoda <hiroto.toyoda@dena.com>
2026-09-03 16:00:29 +02:00
..
api feat(hooks): retain failed pre_start containers for post-mortem 2026-08-20 18:57:02 +02:00
bridge fix(bridge): confirm before wiping non-empty convert output dir 2026-09-03 14:38:41 +02:00
compose fix(down): spare dangling images of orphaned services, like their tagged image 2026-09-03 16:00:29 +02:00
dryrun remove buildx as a Go dependency 2026-08-25 17:27:26 +02:00
e2e fix(bridge): confirm before wiping non-empty convert output dir 2026-09-03 14:38:41 +02:00
mocks chore(mocks): fix the stale mockgen invocation and pin its version 2026-08-20 15:16:43 +02:00
remote refactor: split ociRemoteLoader.Load pull and index resolution 2026-08-18 13:37:48 +02:00
utils fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch fix(watch): stop swallowing SetRecursive errors via nolint 2026-09-02 15:07:08 +02:00