Repository navigation
A step whose ending the plan gate refused queues the owed step - #962
Merged
Merged
Conversation
A done or waiting ending the end gate refuses (the run's plan still owes a repository) left the run "running" with nothing queued. The plan sweep read any running run as building, and the stuck-run sweep later ended it as a timeout or an unfinished round after 20 minutes, never building what the plan owed. - run_ending remembers each run a gated ending was asked for in this process. When a ticket step, a feedback round or a resume ends, each such run that is still running with no step queued since the step began, and whose plan owes a repository, gets the owed step queued (plan_continue::after_step). The claim requires that no step was queued since, so it never starts a second step. - The plan sweep is the backstop: a running run that owes a repository, with no step queued after its last write and no write for 20 minutes, gets its step queued (plan_continue::orphaned), claimed only while the record is unchanged. - The stuck-run sweep leaves a running run that owes part of its plan to the worker for 60 minutes before ending it as usual.
Contributor
|
🟡 Post-merge health check: deploy cancelled: the deploy for
|
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.
Summary
Follows #956. When a run's plan still owes a repository, the end gate refuses its done or waiting ending. Before this change, a step whose ending was refused left the run "running" with no step queued. The plan sweep read every running run as building, so nothing queued the owed repository; the stuck-run sweep later ended the run as a timeout or an unfinished round.
Now the step that was refused queues the owed step as it ends, and the plan sweep restarts a running run that has had no step for longer than a step can take.
Changes
common::run_ending: records each run a gated (done or waiting) ending was asked for in this process (take_gated, bounded).worker::plan_continue::after_step: the Ticket, Feedback and Resume handlers call it when a step ends. For each recorded run that is still running, has no step queued since the step began, and still owes a repository, it queues the owed step. The claim requires that no step was queued since, so it never starts a second one.worker::plan_continue::orphaned: the plan sweep's backstop. A running run that owes a repository, with no step queued after its last write and no write for 20 minutes, gets its step queued. The claim only goes through if the record is unchanged.lambda/stuck-run-cleanup: leaves a running run that owes part of its plan to the worker for 60 minutes before ending it as usual (plan_owedis now read by its scan).Verification
cargo fmt --all --check,rustfmt --checkon the incident files,cargo clippy -p common -p worker -p gateway --all-targets -- -D warnings,cargo test -p common -p worker -p gateway, the lambda unit tests and node tests,brand_spelling.pyanddomain_examples.py.