Repository navigation
Add a restart command for runner pools - #35
Merged
Merged
Conversation
Replacing runners took two commands: stop --wait, then start. restart does it in one request without a stopped window. It starts the pool if it was stopped, clears failure backoff like start, and bumps the pool generation so every existing runner drains like stop and is replaced once it exits. --force terminates them instead, --all targets every pool, and a deleting pool is rejected like start. --wait returns once no runner from before the restart remains and the target count is idle or busy. The dashboard restarts the selected pool with R after a confirmation. Closes #34
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.
Closes #34
Problem
Replacing a pool's runners needed
stop --waitfollowed bystart, with a stopped window in between, and the dashboard had no equivalent.Change
runnerctl restart POOL | --all [--force] [--wait --timeout D], reusingTargetandWaitArgs.Request::Restart: setsrunning = true, clearsretry_at/failures/errorand the GitHub cache (likestart), increments the pool generation and marks every existing runretiring(plusforcewith--force). Deleting pools are rejected likestart.{"restarted":[...],"mode":"drain"|"force","message":...}.--waitfinishes when every runner has the new generation andreplicasrunners are idle or busy; the existing cleanup wait was generalized (Goal::Stopped/Removed/Replaced), with unchanged behavior forstop/pool remove.Rrestarts the selected pool after confirmation (drain mode); help lists it.Open questions from the issue: a stopped pool is started by
restart. Restarting the manager process (service restart) is not part of this PR.Verification
cargo fmt --check,cargo clippy --all-targets --locked -- -D warnings,cargo test --locked(48 unit + 7 CLI + 2 responsiveness tests pass).--all, deleting pool error), TUI confirmation, offline CLIrestartJSON and argument errors.--waitagainst a live manager are not verified end to end.