compose/pkg
Nicolas De Loof 7849a5091e fix(service_containers): don't swallow an inherited deadline as a wait timeout
Copilot review: waitDependency's optional-dependency tolerance (the
previous commit) treated ANY DeadlineExceeded on ctx as this call's own
timeout -- including one inherited from an ancestor context the caller
never gave this specific call a deadline of its own for. A plan whose
only outstanding work was an optional, never-satisfied wait could see
the API caller's own external deadline (a wrapper tool, a test
harness) expire, get silently converted to a Skipped event, and report
success despite the caller's context having actually timed out.

waitDependency gains a hasOwnDeadline bool: true only when the
specific call is responsible for ctx's deadline (waitDependencies
passes timeout > 0; execWaitCondition passes exec.waitTimeout > 0,
exactly the condition under which executor.go's dispatch wrapped ctx
with that same field). Only a DeadlineExceeded under hasOwnDeadline is
tolerated for an optional dependency; one without it still propagates,
regardless of Required.

TestWaitDependencyDeadline gains "an inherited parent deadline is not
swallowed for an optional dependency" (timeout=0, an already-expired
parent ctx) alongside the existing "own timeout is skipped" case --
verified by ablation that dropping hasOwnDeadline from the condition
makes the new test fail exactly as described.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-15 14:52:20 +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(service_containers): don't swallow an inherited deadline as a wait timeout 2026-10-15 14:52:20 +02:00
dryrun feat(registry): use the Docker Desktop Hub session for Docker Hub credentials 2026-10-07 14:24:28 +02:00
e2e feat(run): --no-recreate reuses existing dependencies as-is 2026-10-14 09:34:19 +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