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.

Store CI run records in the database, not the repository

b312e1660ac3d570fc35350a22b3514c56ab466f · Keenan Nemetz · 11d ago · parent db5e4382

Store CI run records in the database, not the repository

A finished attempt was a set of files on the vole branch: a record, step
ranges, and artifact pointers, pushed as a commit. At 959 files, CI records
were 849 of them, and every human metadata write had to carry them.

The runner now sends the record with its finish message over the SSH channel
that holds the lease. The server checks the account, the job, and the log and
artifact pointers, then writes the attempt, steps, artifacts, attestation, and
run result in one transaction in data/runs.db. A tagged build still pushes its
release pointers to the branch after the record is stored.

Pre-receive refuses a new runs/ file. vole admin index rebuild imports records
still on an old branch; records written since are never deleted by a rebuild.
The run page reads the stored attempt, and runs.db is now a source that must be
backed up.

This stops new CI history from entering Git. Existing commits keep the records
they already have; removing those would require rewriting the protected vole
branch, which this change does not do.

forge/instance.go +4−3

@@ -333,8 +333,9 @@ func (i *Instance) DeleteRepo(name, actor string) error {
333 333 return nil
334 334 }
335 335
336 // RebuildIndex reconstructs the derived repository and issue rows, then the
337 // finished half of the run queue from the records on the metadata branch.
336 // RebuildIndex reconstructs the derived repository and issue rows, then imports
337 // any run records still on the metadata branch. Records written since CI history
338 // moved into the database are already there and are never deleted.
338 339 func (i *Instance) RebuildIndex() (repos int, runRecords int, err error) {
339 340 repos, err = i.Index.Rebuild(i.Repos)
340 341 if err != nil {
@@ -344,6 +345,6 @@ func (i *Instance) RebuildIndex() (repos int, runRecords int, err error) {
344 345 if err != nil {
345 346 return repos, 0, err
346 347 }
347 runRecords, err = i.Runs.RestoreFinished(list, "refs/heads/vole")
348 runRecords, err = i.Runs.ImportLegacyRecords(list, "refs/heads/vole")
348 349 return repos, runRecords, err
349 350 }