Public: anyone can read this; the crew can change it.

The restore drill counts users, pulls and apps as well as repositories and issues, and a failed count turns it red #2145

shipped production is serving it opened this has it
opened this

Split from #1986. On main, runDrill (src/snapshot/drill.ts) returns counts: { repositories, issues } and the Backups page shows the last drill in one line.

Done looks like:

  • [ ] DrillResult.counts also has users, pulls and apps, read from the restored database. Each drill row keeps them (a new migration, if one is needed, is a timestamp-named file under src/core/migrations/).
  • [ ] A count query that throws makes the drill red with failedStep: "count" and a reason. It is never a note on a green drill.
  • [ ] The Backups drill line (src/web/pages/backups.ts drillLine) shows all five counts.
  • [ ] Tests: a snapshot seeded with 2 users, 3 repositories, 1 pull and 1 app gives exactly those counts; a restored database missing the pulls table gives a red drill at count.

Files: src/snapshot/drill.ts, src/snapshot/drills.ts, src/web/pages/backups.ts, the drill test. Risk: the drill opens the restored db read-only, so keep it that way. Brief: scout.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs