vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Stop a superseded build instead of leaving it to finish
3031e35772b7d5498c3cb1427424169889632ab5 · Keenan Nemetz · 11d ago · parent 3ae0f579
Stop a superseded build instead of leaving it to finish A push that replaced a branch tip canceled the older commit's queued runs but left a running one alone. With long jobs and a single-slot runner, the runner kept building a commit that was no longer on the branch while the new tip's jobs waited. A rewrite can leave that commit unreachable entirely: on rack's seam-joint branch the old tip ran for 27m38s after the branch had moved, with 12 jobs queued behind it. CancelSuperseded now asks a running run for the replaced commit to stop too: it sets cancel_requested and leaves the lease, which is the path a manual cancel already uses. The runner stops at its next heartbeat, RecordAttempt keeps the result canceled rather than failed, and RequeueExpired already cancels a requested stop whose runner vanished instead of making it leasable again. The stale-deploy test moves its second commit with a fetch instead of a push: a push now stops the running build, and the deploy guard is what covers the window before the runner sees the request. It then pushes a third commit so the fresh-build half of the test still runs. Verified with go test ./server/ and vole workflow run verify.
docs/workflows.md +5−4
| @@ -371,10 +371,11 @@ vole run rerun <run-id> | |||
| 371 | 371 | vole run cancel <run-id> | |
| 372 | 372 | ``` | |
| 373 | 373 | ||
| 374 | A new push cancels queued runs for the commit it replaced but does not stop a | ||
| 375 | running job. A disappeared runner's job is requeued; after five attempts it | ||
| 376 | fails. An attempt that stops before its first step is **could not run**, not a | ||
| 377 | failure of the commit. [Scheduling and the queue](runner.md#scheduling-and-the-queue) | ||
| 374 | A new push cancels queued runs for the commit it replaced and asks a running | ||
| 375 | one to stop at its next heartbeat: the old commit is no longer what the ref | ||
| 376 | names, so finishing it would only spend the runner. A disappeared runner's job | ||
| 377 | is requeued; after five attempts it fails. An attempt that stops before its | ||
| 378 | first step is **could not run**, not a failure of the commit. [Scheduling and the queue](runner.md#scheduling-and-the-queue) | ||
| 378 | 379 | describes retries and storage. | |
| 379 | 380 | ||
| 380 | 381 | ## Contributor branches | |