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/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Phase 4: record the queue's new shape, and let the pins be tested while running

d798eaacf9b210fcdc2b51372d64a0e21e239bab · Keenan Nemetz · 17d ago · parent ac433531

Phase 4: record the queue's new shape, and let the pins be tested while running

Docs, plus the two tests whose setup the new cancellation invalidates.

docs/roadmap.md gains slices 7 and 8, rewrites the Phase 4 remaining list (the
push-event table is gone by decision; what is left is the toolchain in the record, a
narrowing/targeting filter for a mixed fleet, and a per-repository cap somebody would
have to tune), adds an exit criterion for "a push whose spool file was never written
still runs", and appends four decision-log rows: reconcile from the refs rather than
persist events, park an idle lease on a wake-up channel, cancel queued superseded
runs and order the lease by in-flight count, and keep runner presence in the queue
filtered by the clone rule. README describes the new queue behaviour and /runners,
and its stale "instance ed25519 key generated at first boot" line is replaced: the
instance holds no signing key.

Two tests built their scenario on a superseded run being started — queue v1, push v2,
then run both. That is exactly what the queue no longer does, so both now hold the
first build inside its step with a sentinel file, land the second push while it is
running, and release it. The properties are unchanged and now tested where they
actually apply: a build that is running when the branch moves must not publish a site
(TestWorkflowRefusesAStaleSiteDeploy), and a run executes the steps it was queued
with, not the workflow as the branch has it now
(TestQueuedRunUsesTheWorkflowItWasQueuedFrom). A run that is still waiting when the
new tip arrives is canceled, which TestANewerTipCancelsTheQueuedBuildOfTheOlderOne
covers.

scripts/ci.sh green before these comment-and-doc edits (internal/server 132.9s,
everything else included); gofmt, vet, build and the markdown link check green after.

internal/config/config.go +6−2

@@ -97,8 +97,12 @@ func (c *Config) UsersDB() string { return filepath.Join(c.DataDir, "users.db")
97 97 func (c *Config) AuditLog() string { return filepath.Join(c.DataDir, "audit.log") }
98 98 func (c *Config) IndexDB() string { return filepath.Join(c.DataDir, "index.db") }
99 99
100 // RunsDB holds the CI queue and finished runs. Unlike index.db it is not derived:
101 // a run happened or it did not.
100 // RunsDB holds the CI queue and finished runs. It is authoritative for work that has
101 // not happened yet — a queued or leased job exists only there — while the finished
102 // half is derived from the records on each repository's metadata branch, and pending
103 // work is reconciled from the refs. Deleting it loses the attempts that were in
104 // flight; the current tip of every ref is queued once and `vole index rebuild`
105 // restores the finished history.
102 106 func (c *Config) RunsDB() string { return filepath.Join(c.DataDir, "runs.db") }
103 107
104 108 // SpoolDir receives accepted push events from post-receive hooks.