vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Stop a running job at its runner's next heartbeat
0c14f0789af1ab0c43f99043acd7507eec4956e4 · Keenan Nemetz · 6d ago · parent 7e0b5950
Stop a running job at its runner's next heartbeat A maintainer could cancel a queued run and nothing else: CancelRun only retired waiting work, so a build that was clearly wrong or expensive held its runner until its budget ran out, or until somebody killed the container by hand. The queue cannot kill a process it does not own, but it can ask. Canceling a running run now marks the queue row and leaves the lease alone, because the runner still holds it and its partial attempt has to be acceptable. The runner sees the request on the heartbeat it already sends while a step or an image build runs, stops the container, writes one line to the log, and reports what it did. RecordAttempt and Finish then keep the canceled status instead of mapping the nonzero exit code to failed, so the partial log and step timings survive and the run is not a red build. A stop request whose runner dies first becomes canceled on the expiry sweep rather than being leased again, and a rerun clears the request: it is a new decision. The run page says who asked, distinguishes a run stopped while running from one canceled in the queue, and shows the interrupted step as stopped rather than failed. Closes #162.
docs/runner.md +5−2
| @@ -362,8 +362,11 @@ How the queue behaves: | |||
| 362 | 362 | - A push normally reaches the queue in under a second. Every 30 seconds Vole also | |
| 363 | 363 | compares each branch and tag with the last tip it queued, so a missed | |
| 364 | 364 | notification still produces a run. | |
| 365 | - Pushing again cancels queued runs for the commit it replaced. It never cancels a | ||
| 366 | run that is already in progress. | ||
| 365 | - Pushing again cancels queued runs for the commit it replaced. It never stops a run | ||
| 366 | that is already in progress. A maintainer can stop one from its page: the queue | ||
| 367 | records the request, the runner sees it on its next heartbeat, stops the container, | ||
| 368 | and reports the partial attempt. The run stays `canceled` rather than becoming a | ||
| 369 | failure, and its page says who asked. | ||
| 367 | 370 | - If a runner disappears, its job is requeued. After five attempts the job fails | |
| 368 | 371 | instead of cycling forever. | |
| 369 | 372 | - Deleting `data/runs.db` loses CI history and attempts that were in flight. Current | |