mirror of
https://github.com/docker/compose.git
synced 2026-11-18 14:13:49 +00:00
Copilot review, following up on 374079a32's own fix: serviceNodes keeps only the LAST node processed during a service's create-phase convergence -- correct for a single replica, but a scaled service can have more than one exceptional-state (paused, dead) replica, each with its own bare-restart OpStartContainer node. Using serviceNodes alone in planServiceStart's len(replicas) == 0 branch meant a downstream service_started consumer only ended up depending on the highest- numbered replica's restart, not every one of them. exceptionalStateRestartNodes collects every OpStartContainer node from containerNodes[service] (which tracks all of them, unlike serviceNodes), in deterministic replica-number order. planServiceStart now merges all of them into startChainEnds alongside the dependency prerequisites. TestPlanStart_ScaledExceptionalStateConsumerWaitsForEveryRestart pins it: two exceptional-state replicas, asserting the consumer depends on both restart nodes -- verified by ablation to depend on only the last one without the fix. Two more small, independent fixes from the same review round: - execWaitCondition's doc comment (executor_ops.go) described the pre-waitTimeout "no deadline, caller wraps ctx" design; updated to describe planExecutor.waitTimeout's actual per-node window. - waitDependency's new optional-dependency-timeout tolerance (the previous commit) gains its own direct regression test (TestWaitDependencyDeadline/expired deadline on an optional dependency is skipped, not an error) -- the existing tests covered a required timeout, user cancellation, and an optional dependency's definitive (non-timeout) failure, but not this specific path. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> |
||
|---|---|---|
| .. | ||
| api | ||
| bridge | ||
| compose | ||
| dryrun | ||
| e2e | ||
| mocks | ||
| remote | ||
| utils | ||
| watch | ||