Skip to content

Add a restart command for runner pools - #35

Merged
clroot merged 1 commit into
mainfrom
pool-restart
Nov 19, 2026
Merged

clroot merged 1 commit into
mainfrom
pool-restart

Conversation

@clroot

@clroot clroot commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #34

Problem

Replacing a pool's runners needed stop --wait followed by start, with a stopped window in between, and the dashboard had no equivalent.

Change

  • runnerctl restart POOL | --all [--force] [--wait --timeout D], reusing Target and WaitArgs.
  • Manager Request::Restart: sets running = true, clears retry_at/failures/error and the GitHub cache (like start), increments the pool generation and marks every existing run retiring (plus force with --force). Deleting pools are rejected like start.
  • Response: {"restarted":[...],"mode":"drain"|"force","message":...}.
  • --wait finishes when every runner has the new generation and replicas runners are idle or busy; the existing cleanup wait was generalized (Goal::Stopped/Removed/Replaced), with unchanged behavior for stop/pool remove.
  • TUI: R restarts the selected pool after confirmation (drain mode); help lists it.
  • README and docs/operations.md updated.

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).
  • New tests: manager restart (start, backoff reset, generation bump, retiring/force, --all, deleting pool error), TUI confirmation, offline CLI restart JSON and argument errors.
  • Not run: Docker lifecycle tests and real GitHub checks, so draining/replacement and --wait against a live manager are not verified end to end.

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
@clroot
clroot merged commit b8270c8 into main Nov 19, 2026
3 checks passed
@clroot
clroot deleted the pool-restart branch November 19, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

러너 풀 restart 명령어 추가

1 participant