compose/pkg
Nicolas De Loof d19b86b9e5 fix(observed_state): skip the hook-container query under ScopeStart
Second Copilot review finding in the same vein as the previous
network/volume fix: collectObservedState's mergeHookContainers call
(getHookContainers, an extra ContainerList with a hook-specific label
filter) is consumed exclusively by create-phase runner reconciliation
(planPreStartHookRunners, reconcile.go) -- the start phase's own
RunPreStart never reads observed.HookContainers at all; it executes a
runner the create phase already prepared, or fails outright if none
exists. Performing this query unconditionally meant a no-op
`compose start` on a service declaring pre_start hooks could fail on
a daemon call the old imperative engine never made.

Gated behind the same scope.plansCreatePhase() check as the network/
volume listing.

New regression test TestCollectObservedState_ScopeStartSkipsHookContainerQuery
registers exactly one ContainerList expectation (the default Times(1)):
gomock fails the test if the extra hook-container listing fires under
ScopeStart. Verified by ablation (reverting the guard reproduces the
failure deterministically, 3/3 runs).

Verified: go build, go test ./pkg/compose/..., and golangci-lint all
clean; full e2e suite re-run clean against a locally built binary
(same 3 pre-existing, environment-specific failures as the stack's
baseline: TestWatch, TestIPC, TestComposeModel).

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-16 10:52:52 +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(observed_state): skip the hook-container query under ScopeStart 2026-10-16 10:52:52 +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): follow the rebuild failure message in the dotenv rebuild test 2026-10-15 17:04:18 +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 fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00