Skip to content

fix: dependency wait timeout surfaced only by luck - #14105

Merged
glours merged 1 commit into
mainfrom
c1-fix-wait-timeout
Aug 20, 2026
Merged

fix: dependency wait timeout surfaced only by luck#14105
glours merged 1 commit into
mainfrom
c1-fix-wait-timeout

Conversation

@ndeloof

@ndeloof ndeloof commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

waitDependency returned nil whenever its context ended, so an expired wait deadline surfaced only when the 500ms poll ticker won the select race and the condition check then failed on the expired context — whether up --wait --wait-timeout failed or silently succeeded after the timeout was effectively a coin toss.

The deadline now returns its error deterministically; a plain user cancellation (Ctrl-C) is still not reported as a dependency failure. Unit test pins both sides (a deadline shorter than the first tick used to be swallowed with certainty); a new e2e scenario documents the user-visible contract (application not healthy after 3s, non-zero exit, container left running).

Part of #14074 (section C) — lot 0 of #14081.

🤖 Generated with Claude Code

waitDependency returned nil whenever its context ended, so an expired
wait deadline was reported only when the 500ms poll ticker happened to
win the select race and the condition check then failed on the expired
context. Whether `up --wait --wait-timeout` failed or silently
succeeded after the timeout was a coin toss, and the "timeout waiting
for dependencies" mapping in waitDependencies was unreachable on the
direct path.

Return the context error when the deadline expired; a plain
cancellation (Ctrl-C) is still not reported as a dependency failure.
The unit test pins both sides deterministically (a deadline shorter
than the first tick used to be swallowed with certainty); the e2e
scenario documents the user-visible contract: `up --wait
--wait-timeout` on a never-healthy service fails with "application not
healthy after Xs" while the container keeps running.

Part of #14074 (section C) / #14081 (lot 0).

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

@glours glours left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants