Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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/workflows.md +4−3

@@ -530,9 +530,10 @@ instance (`pages_ref`), not by the workflow.
530 530
531 531 ## What happens to a queued workflow
532 532
533 Pushing again cancels queued runs for the commit it replaced. It never cancels a
534 run that is already in progress. Finished runs are stored in `data/runs.db`, not on
535 the repository's `vole` branch.
533 Pushing again cancels queued runs for the commit it replaced. It never stops a run
534 that is already in progress; a maintainer can stop that one from its page, and the
535 runner stops at its next heartbeat. The attempt that comes back is kept as canceled.
536 Finished runs are stored in `data/runs.db`, not on the repository's `vole` branch.
536 537
537 538 For what happens when a runner disappears, how work is requeued, and how finished
538 539 history is rebuilt, see [Runners § Scheduling and the queue](runner.md#scheduling-and-the-queue).