{{ message }}
Repository navigation
Commit df7d8b9
committed
fix(wait): dependency wait no longer swallows its own timeout
waitDependencies returned nil when its context expired: every polling
goroutine hit the ctx.Done branch and reported success, so the
'timeout waiting for dependencies' translation after eg.Wait() was
unreachable in practice, and up --wait / start --wait could succeed
silently while nothing was healthy. The error path was only ever taken
by a race, when a health probe happened to be in flight at expiry.
The ctx.Done branch now distinguishes the two reasons the context can
end: a deadline is exactly the failure this function is asked to
detect and is surfaced (callers translate it into their own messages:
'timeout waiting for dependencies', 'application not healthy after X');
a plain cancellation (user interruption) keeps returning nil so
Ctrl-C does not masquerade as a dependency failure — preserving the
behavior of the restart/run/up callers that pass no timeout.
Both paths are now pinned by unit tests; neither message was covered
before.
Part of #14074 (C) and groundwork for the start-in-plan convergence.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>1 parent 81bb4af commit df7d8b9
2 files changed
Lines changed: 52 additions & 0 deletions

0 commit comments