Repository navigation
fix(backups): make the backup restore drill actually run; unique sessions test port - #197
Merged
Merged
Conversation
…ions test port backup-restore-drill.yml (from #194) was invalid YAML, so it failed on every push to main without running a job. Fix the BACKUP_ENCRYPTION_KEY expression, the service health-check options and the missing POSTGRES_USER, and correct the `ps_sql` typo. Both scripts had shell syntax errors and could never have run. Rewrite them to the documented behaviour: gpg-encrypted custom-format pg_dump with retention, and a guarded restore into a *_drill database followed by integrity checks. gpg reads the passphrase on fd 3 with loopback pinentry, the scratch DB is recreated through the postgres maintenance DB, and the backup log no longer prints the connection string. Move tests/integration/sessions.test.mts from embedded Postgres port 5438 to 5451; 5438 is already used by access-control.test.mts and integration files run in parallel. Correct the ROADMAP entry, which described files that don't exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Malware scan: passed, with notes for the reviewerNothing malicious was detected in
|
…allowed in job env Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Drill run on this branch via |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #194 and #143, both merged in today's sweep.
Backup restore drill.
.github/workflows/backup-restore-drill.ymlwas invalid YAML, so it has failed on every push tomainsince #194, without running any job. Both scripts it calls also had shell syntax errors (psal,-symmetric,3<< <"$KEY",date +%sT', a brokenfind -printf | cut, mangled${…\%}expansions), so the drill could never have passed.BACKUP_ENCRYPTION_KEYexpression, correct serviceoptions,POSTGRES_USER: drillto match the connection URLs,psqltypo fixed,pg_isready -h 127.0.0.1, andpermissions: contents: read.scripts/backup-postgres.sh: custom-formatpg_dumppiped intogpg --symmetric, with the passphrase on fd 3 and loopback pinentry. The plaintext dump never touches disk. Keeps the retention window, and no longer logs the connection string, which contains the password.scripts/restore-drill.sh: same guards (RESTORE_CONFIRM=1, target must end in_drill/_scratch, must not be the source DB), plus a plain-identifier check. It drops and recreates the scratch DB through thepostgresmaintenance DB, then restores viapg_restoreand runs the existing integrity checks.Test port.
tests/integration/sessions.test.mts(#143) used embedded Postgres port 5438, whichaccess-control.test.mtsalready uses. It's moved to 5451; 5448–5450 have been suggested to open PRs #140, #142 and #144.ROADMAP.md. The #194 entry described files that don't exist (
postgres-backup.yml,restore-drill.mjs,age,docs/backups.md). It now describes what actually shipped, plus a changelog line for this fix.Verification. Bash syntax-checked locally. The drill was run end to end with
workflow_dispatchon this branch (run linked in a comment below).🤖 Generated with Claude Code