feat: robust support for remote job re-attachment - #224
Merged
Conversation
… an active remote job
…tor and flash mode
Treat a step-executor timeout with an active remote job as a waiting handoff
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.
This pull request introduces robust support for remote job handoff and recovery in the step execution flow, ensuring that long-running jobs are not interrupted or duplicated if an executor times out or crashes. The changes allow step executors to gracefully detach from active remote jobs, mark their status as
waiting, and later re-attach to collect results, preventing wasted compute and duplicate submissions. The recovery logic is unified and explicit, improving reliability and maintainability.Remote job handoff and executor timeout handling:
Added a mechanism for step executors to enter a
waitingstate (rather than failing) if their wall-clock timeout expires but a tracked remote job is still running, with a bounded grace period before handoff. The execution graph node is updated directly to reflect this state, ensuring deterministic handoff and enabling later re-attachment. [1] [2] [3] [4] [5] [6]Introduced the
_await_step_completionhelper to manage timeouts and grace windows without cancelling the in-flight executor, and to distinguish between true timeouts and remote job handoffs.Remote job recovery and re-attachment:
Refactored recovery logic to track in-progress remote jobs, using a new
_REMOTE_JOB_IN_PROGRESS_STATUSESset, and to allow nodes inwaitingstate to resume execution and collect results once jobs settle. [1] [2] [3] [4] [5]Added explicit instructions for re-attaching to existing remote jobs in the executor's
prior_context, preventing duplicate submissions and ensuring idempotency. [1] [2]Interface and status updates:
NodeStatusvalues to includewaiting, reflecting the new handoff state in the execution graph and agent logic.Refactoring and code hygiene: