Repository navigation
fix(upgrade): serialize migrations and verify Alpha 1 recovery - #48
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
RentnerKev
added a commit
that referenced
this pull request
Sep 12, 2026
* fix(upgrade): serialize migrations and verify Alpha 1 recovery * test(upgrade): avoid search-path-dependent relation output * fix(backup): restore older schemas atomically * fix(restore): preserve temporary file ownership while writing
RentnerKev
added a commit
that referenced
this pull request
Sep 12, 2026
* fix(upgrade): serialize migrations and verify Alpha 1 recovery * test(upgrade): avoid search-path-dependent relation output * fix(backup): restore older schemas atomically * fix(restore): preserve temporary file ownership while writing
RentnerKev
added a commit
that referenced
this pull request
Sep 12, 2026
* fix(upgrade): serialize migrations and verify Alpha 1 recovery * test(upgrade): avoid search-path-dependent relation output * fix(backup): restore older schemas atomically * fix(restore): preserve temporary file ownership while writing
RentnerKev
added a commit
that referenced
this pull request
Sep 12, 2026
* feat(admin): add bounded administrative audit log * fix(ci): bound release validation subprocesses * fix(upgrade): serialize migrations and verify Alpha 1 recovery (#48) * fix(upgrade): serialize migrations and verify Alpha 1 recovery * test(upgrade): avoid search-path-dependent relation output * fix(backup): restore older schemas atomically * fix(restore): preserve temporary file ownership while writing
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.
Database startup now serializes migrations and authorization synchronization on one reserved PostgreSQL connection. Restoring an Alpha 1 backup into a newer appliance also replaces newer application-schema objects: restore SQL is fully prepared first, then the application-schema reset and dump execute in one transaction. SQL failures roll back the database and staged key rather than leaving partial data replacement.
The appliance smoke boots the digest-pinned published Alpha 1 image with its actual schema, upgrades the same volumes, repeats startup, and restores its backup into a fresh candidate appliance. It verifies users, roles, settings, hosts, certificates, CAs, migrations, runtime revision, HTTP, verified HTTPS and redirects. A valid archive with an intentionally invalid CHECK-dependent row exercises SQL restore failure; a table created after the dump must survive, and the existing appliance must recover its original traffic.
Closes #34.
Backup/recovery instructions live in docs/upgrades.md with one README link. Startup errors identify the failed phase without printing credentials or SQL. Controller-state replacement follows the committed database restore; a later failure still requires complete recovery, as documented.
Stacked on #47; retarget to main after that prerequisite merges. Do not merge into the feature base.
Validation on 091e6b7: full local check passed (599 TypeScript tests, 119 Rust tests; 107 environment-dependent tests skipped). GitHub CI including PostgreSQL integration, CodeQL and all Production Smokes are green. The production appliance passed 29 checks, including actual Alpha 1 startup, in-place upgrade, repeated startup, fresh backup restore and the exact CHECK-violation rollback case. A separate PostgreSQL 18 reproduction verified the dump/render/transaction path. Temporary file ownership is handed to PostgreSQL only after root writes complete, preserving compatibility with Linux protected_regular. Failed restore diagnostics expose only fixed phases and recognized SQLSTATE codes.