fix: dependency wait timeout surfaced only by luck - #14105
Merged
Conversation
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>
39 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
waitDependencyreturnednilwhenever 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 — whetherup --wait --wait-timeoutfailed 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