compose/pkg/compose
Guillaume Lours 7e3aa869ec fix(port): preserve tie order for dual-stack port publishers
`docker compose port SERVICE PORT` picks the first matching publisher
as its answer, but containerPublishers()'s sort.Slice does not
guarantee tie order, so a dual-stack publish (same target port on
both an IPv4 and an IPv6 address) could non-deterministically return
either one. Switch to sort.SliceStable to preserve the daemon's
original order for ties.

Also drops a dead length check and a duplicated host:port formatter.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-09-14 10:48:03 +02:00
..
testdata
transform chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
api_versions.go
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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
compose.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
container.go
containers.go chore(compose): orphan semantics stated where up and down diverge 2026-08-31 17:09:19 +02:00
containers_test.go chore(compose): orphan semantics stated where up and down diverge 2026-08-31 17:09:19 +02:00
convert.go
cp.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
create.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
create_test.go
dependencies.go refactor: NewGraph stops mutating the project 2026-09-01 10:19:10 +02:00
dependencies_test.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
desktop.go
docker_cli_providers.go
down.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
down_test.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
envresolver.go
envresolver_test.go
events.go
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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
export.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02: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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
image_pruner.go fix(down): spare dangling images of orphaned services, like their tagged image 2026-09-03 16:00:29 +02:00
image_pruner_test.go fix(down): spare dangling images of orphaned services, like their tagged image 2026-09-03 16:00:29 +02: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
kill_test.go
loader.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
loader_test.go
logs.go refactor: flatten Ps, restart and Logs orchestration 2026-08-18 13:37:48 +02:00
logs_test.go
ls.go chore: explicit, unique, greppable names for internal identifiers 2026-08-20 11:17:11 +02:00
ls_test.go
model.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +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): orphan semantics stated where up and down diverge 2026-08-31 17:09:19 +02:00
observed_state_test.go chore(compose): orphan semantics stated where up and down diverge 2026-08-31 17:09:19 +02:00
pause.go
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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
plugins_control_test.go feat(provider): get-service-config provider request 2026-09-08 14:53:14 +02:00
plugins_test.go
port.go PRIVATE_PORT optional for docker compose port 2026-09-11 11:35:18 +02:00
port_test.go fix(port): preserve tie order for dual-stack port publishers 2026-09-14 10:48:03 +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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
printer.go
progress.go
ps.go fix(port): preserve tie order for dual-stack port publishers 2026-09-14 10:48:03 +02:00
ps_test.go
publish.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +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
rebuild_scheduler.go fix(watch): interrupt stale rebuilds so watch converges 2026-09-14 10:47:07 +02:00
rebuild_scheduler_test.go fix(watch): interrupt stale rebuilds so watch converges 2026-09-14 10:47:07 +02:00
reconcile.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
reconcile_test.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
remove.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +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): harden termWriter lifecycle against review findings on #14119 2026-09-09 16:50:05 +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 golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
service_containers_test.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
shellout.go
start.go refactor: NewGraph stops mutating the project 2026-09-01 10:19:10 +02: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
stop_test.go
top.go
unsupported_attributes.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
unsupported_attributes_test.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
up.go refactor: materialize interactive up as an upSession 2026-08-18 13:37:48 +02:00
up_test.go
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
wait.go
watch.go fix(watch): interrupt stale rebuilds so watch converges 2026-09-14 10:47:07 +02:00
watch_test.go fix(watch): interrupt stale rebuilds so watch converges 2026-09-14 10:47:07 +02:00