fix(entrypoint): robust auto-restore - deterministic, loud, never silently skips #141
No reviewers
Labels
No labels
architecture
backend
bug
ci
config
database
docker
documentation
duplicate
enhancement
frontend
help wanted
invalid
issue-25
issue-26
issue-42
issue-65
issue-67
issue-82
migrations
p0-critical
p1-high
p2-medium
p3-low
performance
quality
question
security
state-management
testing
timezone
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
fastie81/honbu-manager!141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/auto-restore-robust"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem (prod incident)
On first PG18 boot the auto-restore silently skipped, so the app migrated a fresh EMPTY DB (booted with 0 members). Data was recovered manually from the pg15 pre-upgrade dump. The bug: the restore scan was a fragile chain (glob+sed+
-lt+guards) with no logging and a silent-skip path — ifPG_MAJORcame up empty or the scan mis-filtered,PREV_DUMPwas empty and the block printed nothing, then booted on empty.Fix (verified against real Postgres)
Rewrite of the auto-restore block to be robust and loud:
pg_dumpfailures), and among qualified picks the highest prior major.exit 1— never boot on a possibly-empty DB silently.Verification (real Postgres, isolated)
pg15dump → fresh target → robust logic restored successfully → target = 75/10/3.bash -nOK.Deploy plan (per user instruction)
Merge → deploy to TEST → verify auto-restore actually fires+logs there (test is currently empty PG18, a perfect canary) → only then tag
v3.4.9to prod. Prod is healthy and data-verified now; this protects the next upgrade from the silent-skip bug.