mirror of
https://github.com/docker/compose.git
synced 2026-11-19 14:40:08 +00:00
A rebuild whose build context was snapshotted before a newer change to one of its own services is doomed: its output will be replaced by the trailing rebuild anyway, and meanwhile a sync+restart change landing in that window was silently lost — the sync went to the doomed container, the restart was skipped, and the replacement image predated the edit. The scheduler now gives each run its own cancellable context and upholds one invariant: every request ends up covered by a rebuild whose snapshot postdates it. A request naming an actively-rebuilt service interrupts the run and folds its whole active set back into pending (interruption kills the other services' rebuild too), so the trailing rebuild redoes everything on a fresh snapshot. Requests for other services keep coalescing without interrupting. handleWatchBatch drops a restart only when the rebuild is pending (that one converges on its own) and folds it into a Request when the rebuild is in flight — recreate + start is the restart intent, converged. The run loop also stops draining once the watch context is cancelled, which silences the spurious "Build failed: context canceled" on Ctrl-C. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> |
||
|---|---|---|
| .. | ||
| api | ||
| bridge | ||
| compose | ||
| dryrun | ||
| e2e | ||
| mocks | ||
| remote | ||
| utils | ||
| watch | ||