fix(runner): bound pollUntilDone for wedged runs#19
Merged
Conversation
pollUntilDone looped forever while a run stayed `running`. A detached run that never finalized (the light-runner detached-extract hang, fixed in light-runner 0.16.2) wedged the whole DAG: the node poll never returned. Belt-and-suspenders on the light-process side so a stuck run fails the node instead of hanging. - bounded node (timeout > 0): deadline = timeout + 5 min grace (image pull, extraction and teardown all run outside the container's own timeout window); past it, throw, which the executeNode catch turns into a failed node result - timeout 0 (opt-out): keep polling indefinitely, unchanged build with cc
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.
Problem
pollUntilDonelooped forever (while (true)) while a run stayedrunning. A detached run that never finalized, the light-runner detached-extract hang fixed in light-runner 0.16.2, wedged the whole DAG: the node poll never returned.Fix (belt-and-suspenders on the light-process side)
The root cause is fixed in light-runner 0.16.2. This adds a safety net so a stuck run fails the node instead of hanging the orchestrator:
timeout > 0): deadline =timeout + 5 min grace. The grace covers image pull, extraction and teardown, which all run outside the container's own timeout window. Past the deadline,pollUntilDonethrows; the existingexecuteNodecatch turns it into a failed node result (no process crash).timeout 0(opt-out): keeps polling indefinitely, unchanged.node.timeoutis milliseconds end-to-end (passed straight through to light-run, which caps it at 3.6M ms = 1h), so the deadline math is in ms.build with cc