compose/pkg
Nicolas De Loof e1131ad655
Some checks are pending
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 / 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) (push) Waiting to run
ci / e2e (standalone, oldstable) (push) Waiting to run
ci / e2e (plugin, stable) (push) Waiting to run
ci / e2e (standalone, stable) (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
refactor(reconcile): aggregate observed resources, resolve conflicts in reconcile
collectObservedState indexed networks/volumes by compose label into a
single-valued map, so two live resources sharing a label (e.g. a leftover
after a rename) collided and the "winner" depended on the daemon's list
order — a nondeterministic `up` (spurious create/recreate events, possible
churn) on subsequent runs.

Make collection lossless and move the selection into the reconciler:

- ObservedState.Networks/Volumes become map[string][]Observed*: collection
  records every label-sharing resource and makes no premature choice.
- selectNetwork/selectVolume deterministically pick the resource matching
  the desired name (else the lexicographically smallest), returning the
  others as orphans.
- reconcile resolves the observed state once (resolveObserved) into
  single-valued resolvedNetworks/resolvedVolumes used everywhere, and warns
  about orphans instead of acting on them — they are left untouched because
  removing them could drop data or break unrelated workloads.

Adds selection unit tests, a collector aggregation test and a reconcile
conflict test (deterministic no-op + orphan warning across list orders).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-07-27 14:56:25 +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 refactor(reconcile): aggregate observed resources, resolve conflicts in reconcile 2026-07-27 14:56:25 +02:00
dryrun chore(deps): github.com/docker/cli v29.6.0 2026-06-22 09:00:18 +02:00
e2e Tolerate missing env file on runtime commands 2026-07-27 09:20:14 +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