feat: run the next version's migrations against verify replicas - #107
Merged
Conversation
# Conflicts: # src/controllers/canopy/intent.rs
dannash100
marked this pull request as ready for review
July 31, 2026 00:38
passcod
reviewed
Jul 31, 2026
passcod
reviewed
Jul 31, 2026
# Conflicts: # Cargo.lock # Cargo.toml
passcod
approved these changes
Jul 31, 2026
# Conflicts: # .github/workflows/integration.yml # Cargo.toml # README.md # src/controllers/canopy/intent.rs # src/controllers/restore/builders.rs # src/controllers/restore/tests.rs
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.
Changes
Audit logging had no spec: nothing under
specs/mentioned the changelog. This addsspecs/audit/changelog.md, covering what is logged, what an entry holds, when entries are written, attribution and pausing, and synchronisation.The synchronisation section deserves the most careful read: entries are
DO_NOT_SYNCand travel attached to the record they describe, receivers pause auditing so entries are copied rather than regenerated, and mobile is the exception (central authors entries for mobile-originated changes). All verified against the code.Two criteria are stated declaratively but only become true with #10635: "exactly one changelog trigger" (
prescriptionscurrently double-logs) and thesigners_historicalexclusion. Hard-delete capture is deliberately absent; its criteria land with #10632.Each criterion is meant to be a checkable fact about behaviour, so review those rather than the prose.
Attributing a failure. Tamanu only writes a
logs.migrationsbatch once every migration in it has applied, so a failed run writes no row. Two consequences are handled here: the result reader records the newest batch already in the snapshot before starting the Job and ignores anything at or before it, so a failure is never pinned on one of the deployment's own past upgrades; andfailedMigrationis read fromstats.failedMigration, falling back tounknownfor target versions that don't record it. beyondessential/tamanu#10647 makes tamanu record the failed batch, which is what fills that field in.Auto-Deploy
Options
Tests
Review Hero
.github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.Remember to...