mirror of
https://github.com/docker/compose.git
synced 2026-11-20 06:59:53 +00:00
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> |
||
|---|---|---|
| .. | ||
| api | ||
| bridge | ||
| compose | ||
| dryrun | ||
| e2e | ||
| mocks | ||
| remote | ||
| utils | ||
| watch | ||