compose/pkg/compose
Nicolas De Loof 720da68475
Some checks failed
ci / validate (lint) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
docs-upstream / docs-yaml (push) Has been cancelled
docs-upstream / validate (push) Has been cancelled
chore(compose): comments state behavior, not history
Eleven comments in the reconciler and its neighbors justified decisions
by pointing at code that no longer exists ('matching the previous
ensureNetwork behavior', 'same way as convergence.go:138-160' — lines
that today hold unrelated code) instead of stating the behavior and its
reason. A reader following those pointers finds nothing, or worse,
something else.

Each is rewritten as a self-contained behavioral statement. Two carry
real weight:
- reconcileService's up-to-date branch now says explicitly that
  starting containers is NOT the plan's job (a separate start phase in
  start.go does it) — the previous wording invited 'fixing' the
  StateCreated case;
- sortContainers now documents that its ordering IS the scale-down
  policy (the tail it produces is what i >= expected trims), instead of
  referencing stale line numbers.

Part of #14074 (A: the code misdescribes its own structure).

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-08-27 12:14:54 +02:00
..
testdata
transform chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
api_versions.go fix: gate extra EndpointsConfig behind API >= 1.44 2026-03-31 15:44:00 +02:00
apiSocket.go
attach.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
attach_service.go
build.go remove buildx as a Go dependency 2026-08-25 17:27:26 +02:00
build_bake.go build: error messages name the real remedy, not a removed builder 2026-08-27 11:05:09 +02:00
build_bake_test.go fix(build): honor provenance/sbom false in per-service bake attest 2026-08-25 17:46:03 +02:00
build_classic.go build: error messages name the real remedy, not a removed builder 2026-08-27 11:05:09 +02:00
build_test.go fix(build): canonical content-digest producer, single image-label writer 2026-08-13 12:03:29 +02:00
commit.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
compose.go remove buildx as a Go dependency 2026-08-25 17:27:26 +02:00
container.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
containers.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
convert.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
cp.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
create.go chore(compose): comments state behavior, not history 2026-08-27 12:14:54 +02:00
create_test.go fix: gate extra EndpointsConfig behind API >= 1.44 2026-03-31 15:44:00 +02:00
dependencies.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
dependencies_test.go fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00
desktop.go refactor: drop Desktop beta-settings check; gate hint on LogsTab flag 2026-05-18 17:28:03 +02:00
docker_cli_providers.go
down.go feat(hooks): clean up retained pre_start containers on compose down 2026-08-20 18:57:02 +02:00
down_test.go feat(hooks): clean up retained pre_start containers on compose down 2026-08-20 18:57:02 +02:00
envresolver.go
envresolver_test.go
events.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
exec.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
executor.go executor: split into ops + events files 2026-06-08 20:14:38 +02:00
executor_events.go executor: split into ops + events files 2026-06-08 20:14:38 +02:00
executor_ops.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
executor_test.go fix(network): pass IPAM options when creating networks 2026-08-20 12:36:23 +02:00
export.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
filters.go feat(hooks): clean up retained pre_start containers on compose down 2026-08-20 18:57:02 +02:00
generate.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
hash.go fix(reconcile): preserve zero-replica services during hashing 2026-07-16 15:19:50 +02:00
hash_test.go
hook.go feat(hooks): clean up retained pre_start containers on compose down 2026-08-20 18:57:02 +02:00
hook_test.go feat(hooks): retain failed pre_start containers for post-mortem 2026-08-20 18:57:02 +02:00
image_pruner.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
images.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
images_test.go fix(images): tolerate containers whose image record is gone 2026-08-14 15:20:37 +02:00
kill.go refactor(compose): extract forEachContainerConcurrent to deduplicate pause/kill logic 2026-05-12 11:31:40 +02:00
kill_test.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
loader.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
loader_test.go fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00
logs.go refactor: flatten Ps, restart and Logs orchestration 2026-08-18 13:37:48 +02:00
logs_test.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
ls.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
ls_test.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
model.go use new moby/moby modules instead of docker/docker dependency 2026-04-08 08:50:50 +02:00
monitor.go docs: document engine container event sequences in up monitor 2026-08-19 13:46:30 +02:00
monitor_test.go refactor: one handler per container event in monitor.Start, add tests 2026-08-18 13:37:48 +02:00
observed_state.go chore(compose): comments state behavior, not history 2026-08-27 12:14:54 +02:00
observed_state_test.go fix(build): canonical content-digest producer, single image-label writer 2026-08-13 12:03:29 +02:00
pause.go refactor(compose): extract forEachContainerConcurrent to deduplicate pause/kill logic 2026-05-12 11:31:40 +02:00
plan.go feat(reconcile): best-effort old-network removal on rename 2026-07-27 14:56:25 +02:00
plan_test.go tests: cover depends_on chaining and OpRunProvider stringer 2026-06-08 20:14:38 +02:00
plugins.go lint: replace gocyclo with gocognit 2026-08-18 10:42:37 +02:00
plugins_test.go fix: stop-only metadata no longer drops options for up/down 2026-05-18 11:11:38 +02:00
plugins_windows.go
port.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
pre_start.go feat(hooks): retain failed pre_start containers for post-mortem 2026-08-20 18:57:02 +02:00
pre_start_test.go feat(hooks): retain failed pre_start containers for post-mortem 2026-08-20 18:57:02 +02:00
printer.go
progress.go fix: restore stoppingEvent/stoppedEvent helpers for plugin stop hook 2026-05-18 15:12:39 +02:00
ps.go refactor: flatten Ps, restart and Logs orchestration 2026-08-18 13:37:48 +02:00
ps_test.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
publish.go fix(display): stop ttyWriter.Done from hanging after context cancel 2026-08-25 11:38:50 +02:00
publish_test.go fix(config): pin type:image volume sources and pre_start hook images 2026-07-24 15:33:21 +02:00
pull.go remove buildx as a Go dependency 2026-08-25 17:27:26 +02:00
pull_test.go docs+test: disambiguate content digests from distribution digests 2026-08-13 12:03:29 +02:00
push.go registry: encode credentials with moby's authconfig package 2026-08-25 17:27:26 +02:00
reconcile.go chore(compose): comments state behavior, not history 2026-08-27 12:14:54 +02:00
reconcile_test.go chore(compose): rename convergence.go, whose convergence engine no longer exists 2026-08-27 11:48:19 +02:00
remove.go fix(display): stop ttyWriter.Done from hanging after context cancel 2026-08-25 11:38:50 +02:00
restart.go refactor: flatten Ps, restart and Logs orchestration 2026-08-18 13:37:48 +02:00
restart_test.go test: unit-lock the imperative start path 2026-08-20 15:09:16 +02:00
run.go fix(display): stop ttyWriter.Done from hanging after context cancel 2026-08-25 11:38:50 +02:00
scale.go api: ScaleOptions carries the replica counts it always pretended to 2026-08-20 10:16:06 +02:00
scale_test.go api: ScaleOptions carries the replica counts it always pretended to 2026-08-20 10:16:06 +02:00
secrets.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
service_containers.go chore(compose): rename convergence.go, whose convergence engine no longer exists 2026-08-27 11:48:19 +02:00
service_containers_test.go chore(compose): rename convergence.go, whose convergence engine no longer exists 2026-08-27 11:48:19 +02:00
shellout.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
start.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
start_test.go feat(hooks): clean up retained pre_start containers on compose down 2026-08-20 18:57:02 +02:00
stop.go perf: avoid duplicate provider metadata fetch on stop 2026-05-18 11:11:38 +02:00
stop_test.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
suffix_unix.go
top.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
up.go refactor: materialize interactive up as an upSession 2026-08-18 13:37:48 +02:00
up_test.go Fix up attach filtering 2026-03-25 10:07:02 +01:00
viz.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
viz_test.go refactor: last gocognit candidates — bridge resources and TestViz 2026-08-18 13:37:48 +02:00
volumes.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
volumes_test.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
wait.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
watch.go fix(watch): match Dockerfile/compose ignore patterns by literal name and basename 2026-08-24 14:48:22 +02:00
watch_test.go fix(watch): match Dockerfile/compose ignore patterns by literal name and basename 2026-08-24 14:48:22 +02:00