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.
Drop the legacy run-record import
59badc638dde0655b11d01eebfe3a457735d2501 · Keenan Nemetz · 11d ago · parent b312e166
Drop the legacy run-record import There is no released instance to stay compatible with, so the file format under runs/, the branch importer, and the pre-receive allowance for that directory are gone. The Record value is now only the finish wire format and the shape stored in run_attempts. metadata.ValidateIssues rejects runs/ like any other unknown directory, and vole admin index rebuild no longer reads run history from Git. An existing instance migrates once with the previous build, then rewrites the vole branch to remove the old records. Nothing in this build reads them.
server/hook/records.go −45
| @@ -1,45 +0,0 @@ | |||
| 1 | package hook | ||
| 2 | |||
| 3 | // CI run records no longer live on the metadata branch. A runner sends the result | ||
| 4 | // over its authenticated finish channel, and the server stores it in runs.db. The | ||
| 5 | // push boundary's only remaining job is to refuse a client that tries to put a | ||
| 6 | // record back: a record in Git would be ignored by the server and would grow the | ||
| 7 | // branch again. | ||
| 8 | // | ||
| 9 | // Deletions are allowed so an operator can remove records written before the move. | ||
| 10 | // Additions, edits and renames are refused. | ||
| 11 | |||
| 12 | import ( | ||
| 13 | "fmt" | ||
| 14 | |||
| 15 | "github.com/rodent-software/vole/ci/runs" | ||
| 16 | "github.com/rodent-software/vole/core/git" | ||
| 17 | ) | ||
| 18 | |||
| 19 | func recordFindings(g *git.Repo, c change) []string { | ||
| 20 | changes, err := runs.RecordChanges(g, c.old, c.new) | ||
| 21 | if err != nil { | ||
| 22 | return []string{fmt.Sprintf("%s: cannot read the run records in this push: %v", c.ref, err)} | ||
| 23 | } | ||
| 24 | var problems []string | ||
| 25 | for _, ch := range changes { | ||
| 26 | if ch.Status == "D" { | ||
| 27 | continue | ||
| 28 | } | ||
| 29 | problems = append(problems, fmt.Sprintf( | ||
| 30 | "%s: run records are stored in the instance database now; a runner reports a result with finish, not a push", | ||
| 31 | ch.Path)) | ||
| 32 | } | ||
| 33 | return problems | ||
| 34 | } | ||
| 35 | |||
| 36 | // openRuns opens the run queue for one gate check. The pre-receive hook is a | ||
| 37 | // process that answers one push and exits, so the store is opened per check and not | ||
| 38 | // closed: the close would come after the answer, and the process ends there anyway. | ||
| 39 | // The server, which is long-lived, passes its own open handle instead. | ||
| 40 | func openRuns(path string) func() (*runs.Store, error) { | ||
| 41 | if path == "" { | ||
| 42 | return nil | ||
| 43 | } | ||
| 44 | return func() (*runs.Store, error) { return runs.Open(path) } | ||
| 45 | } | ||