status/journal(2): Q4.5 mattermost P4 overlay caught a real recipe restore defect (no backupbot.restore.post-hook → DB not reimported); recipe-PR queued (immich pattern); node clean
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -1256,3 +1256,33 @@ Validated: full run 2 (`/root/ccci-matrix-full2.log`) GREEN — `[register] …:
|
||||
(attempt 1) → succeeded (attempt 2)`, all 5 tiers pass, deploy-count=1, clean teardown. Claimed
|
||||
`9a8850a`. (This is a general pattern other DB-write functional tests may need after the restore tier;
|
||||
noted for the remaining recipes.)
|
||||
|
||||
---
|
||||
## 2026-05-30T~00:30 — Q4.5 mattermost-lts: P4 overlay caught a real recipe restore defect
|
||||
|
||||
Authored the mattermost P4 overlay (ops.py postgres ci_marker + test_install/upgrade/backup/restore).
|
||||
First run failed on a self-inflicted bug: the postgres service is named `postgres`, not `db` (I misread
|
||||
compose; `exec_in_app(service="db")` → "no running container"). Fixed (commit 012a477), re-ran.
|
||||
|
||||
Re-run: install+upgrade+backup+custom GREEN (ci_marker survives the upgrade chaos crossover
|
||||
2.1.9+10.11.15→2.1.10+10.11.18, captured "original" at backup; all 3 functional tests pass incl.
|
||||
create_message_roundtrip §4.3). **restore FAILED**: after `abra app restore`, `relation "ci_marker"
|
||||
does not exist`.
|
||||
|
||||
**Root cause = recipe defect (same class as immich, different shape).** mattermost's `postgres`
|
||||
service backs up via a pg_dump pre-hook (→ /var/lib/postgresql/data/postgres-backup.sql) + archives the
|
||||
whole PGDATA dir (`backup.path=/var/lib/postgresql/data/`), but ships **NO `backupbot.restore.post-hook`**.
|
||||
backupbot's restore extracts the archived files into the volume, but the RUNNING postgres doesn't
|
||||
reload PGDATA without a restart, so the live DB keeps the post-drop (pre_restore) state → the seeded
|
||||
marker is gone. The logical dump is in the archive but never reimported.
|
||||
|
||||
**Fix = recipe-PR (immich pattern):** add a `backupbot.restore.post-hook` that reimports the dump into
|
||||
the live DB deterministically — terminate connections → DROP DATABASE … WITH (FORCE) → createdb →
|
||||
`psql -f postgres-backup.sql`. (Validate the mechanism live first, like immich, since the dump is a
|
||||
plain pg_dump reimported into a fresh DB.) Mirror+PR `recipe-maintainers/mattermost-lts`, then
|
||||
`RECIPE=mattermost-lts PR=<n>` proves restore green. QUEUED as the next mattermost unit.
|
||||
|
||||
This is the 2nd recipe (after immich) where the P4 data-integrity overlay caught a genuine
|
||||
backup/restore defect — strong evidence the phase's P4 requirement is doing real work. The remaining
|
||||
backup-capable recipes (bluesky-pds, uptime-kuma, ghost) should be assumed similarly suspect until their
|
||||
restore is proven to round-trip seeded data.
|
||||
|
||||
Reference in New Issue
Block a user