compose/pkg/e2e/testdata/TestUpStartFailureReportsInterruptedServices/compose.yaml
Nicolas De Loof 9a2d0d94ca fix(executor): report the services a failed start interrupts
When a node of a plan phase fails, the executor cancels the whole phase.
The nodes it interrupts, or had not dispatched yet, got no final event:
a service recreated by the command and held by a depends_on wait stayed on
"Recreated", as if it were up, and the row of the dependency it was
waiting for stayed on "Waiting". Nothing said the service was left created
and never started.

Such a node now ends on an Error event, "not started" when its group never
reported Working, which names the depends_on condition it was held by and
the resource whose failure interrupted the phase. A wait interrupted that
way is a failure of its own (the condition was not reached) and closes the
"Waiting" rows of its dependency with a Skipped event. A phase canceled by
its caller (Ctrl-C) is reported as before: silently.

docker/compose#14372

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-26 09:54:25 +01:00

20 lines
433 B
YAML

services:
# never becomes healthy: api, which waits for it, cannot start before web fails
db:
image: alpine
command: sleep infinity
healthcheck:
test: ["CMD", "false"]
interval: 1s
api:
image: alpine
command: sleep infinity
depends_on:
db:
condition: service_healthy
# fails to start: the executable does not exist
web:
image: alpine
command: ["/does-not-exist"]