Sign in

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

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.

Keep the authoritative instance in one database

1a9b383890c40885709804293cd3a75e775f06a0 · Keenan Nemetz · 3d ago · parent 12221a79

Keep the authoritative instance in one database

Move the CI queue and the sealed secret rows into instance.db, leaving index.db as the one derived database. Backups now copy the single authoritative file, and the index stays disposable.

Hooks and the SSH front door use the instance database for run credentials and required checks. The admin db commands and documentation now describe one authoritative database plus the derived index.

This was migrated once by hand on the rodent.software instance; there is no migration command and no legacy-layout check in the shipped code.

server/integration_test.go +3−3

@@ -3439,8 +3439,8 @@ func TestARepoFilterOutsideTheGrantIsRefusedAtStartup(t *testing.T) {
3439 3439 }
3440 3440
3441 3441 // TestRunRecordLivesInTheDatabase is the promise after the move: a finished attempt
3442 // is stored in runs.db, and the metadata branch carries no run record. CI history is
3443 // instance-local; a clone does not carry it.
3442 // is stored in instance.db, and the metadata branch carries no run record. CI history
3443 // is instance-local; a clone does not carry it.
3444 3444 func TestRunRecordLivesInTheDatabase(t *testing.T) {
3445 3445 t.Parallel()
3446 3446 f := newFixtureWith(t, func(c *config.Config) { c.LeaseSeconds = 2 })
@@ -3469,7 +3469,7 @@ jobs:
3469 3469 t.Fatalf("reading the attempt: %v", err)
3470 3470 }
3471 3471 if rec == nil {
3472 t.Fatal("a finished run left no attempt in runs.db")
3472 t.Fatal("a finished run left no attempt in instance.db")
3473 3473 }
3474 3474 if rec.Signer == "" || rec.SHA != done.SHA || rec.Attempt != done.Attempts {
3475 3475 t.Fatalf("attempt = %+v", rec)