Skip to content

fix(scripts): no-issue: normalise migration storage in determinism precheck#10146

Queued
dannash100 wants to merge 1 commit into
mainfrom
fix/no-issue/determinism-build-less-normalise
Queued

fix(scripts): no-issue: normalise migration storage in determinism precheck#10146
dannash100 wants to merge 1 commit into
mainfrom
fix/no-issue/determinism-build-less-normalise

Conversation

@dannash100

@dannash100 dannash100 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Changes

Fixes the Migration determinism check, which has been red on main since #10097 (the build-less switch). The determinism harness builds its baseline DB at the pre-migration commit — which can pre-date the build-less switch and so records .js migration-storage names — then at HEAD areMigrationsAvailable() consulted migrations directly, tripping createMigrationInterface's .js-vs-.ts guard before migrateAndHash() could run the upgrade that normalises them. This normalises the storage in that precheck too (exporting normaliseMigrationStorageExtensions from @tamanu/upgrade), matching what upgrade() already does before any migration state is read. Idempotent / no-op once names are normalised, so it doesn't affect normal post-switch runs.

Auto-Deploy

  • Deploy
Options
  • Artillery load test
  • Seed from closest snapshot
  • Generate fake data
  • More data (20Gi)
  • No facility servers (central-only)
  • No sync (facility tasks scaled to zero)
  • AMD64 architecture (default is arm64)
  • Skip mobile build
  • Always build mobile
  • Stay up for 8 hours
  • Stay up for 24 hours
  • Stay up (no TTL)
  • Build images only (don't deploy)
  • Pause this deploy

Tests

  • Run E2E tests
  • Run DAST scan

Review Hero

  • Run Review Hero
  • Auto-fix review suggestions Wait for Review Hero to finish, resolve any comments you disagree with or want to fix manually, then check this to auto-fix the rest.
  • Auto-fix CI failures Check this to auto-fix lint errors, test failures, and other CI issues.
  • Auto-merge upstream Check this to merge the base branch into this PR, with AI conflict resolution if needed.
  • Save suppressions Check this to capture 👎 reactions on Review Hero comments as suppression rules in .github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.

Remember to...

  • ...write or update tests
  • ...add UI screenshots and testing notes to the Linear issue
  • ...add any manual upgrade steps to the Linear issue
  • ...update the config reference, settings reference, or any relevant runbook(s)
  • ...call out additions or changes to config files for the deployment team to take note of

…echeck

The determinism harness builds its baseline DB at the pre-migration commit,
which can pre-date the build-less switch and so records `.js` migration names.
At HEAD, areMigrationsAvailable() consulted migrations directly, tripping
createMigrationInterface's `.js`-vs-`.ts` guard before migrateAndHash() could
run the upgrade that normalises them. Normalise the storage in the precheck
too (exporting normaliseMigrationStorageExtensions from @tamanu/upgrade),
matching what upgrade() does before any migration state is read.
@review-hero

review-hero Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦸 Review Hero Summary
3 agents reviewed this PR | 0 critical | 0 suggestions | 0 nitpicks | Filtering: consensus 3 voters

No issues found. Looks good!

@dannash100 dannash100 added this pull request to the merge queue Jun 26, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

E2E failure report

E2E failed for run 21589.

The report artifact contains the merged Playwright HTML report with failure videos, screenshots, and traces where available.

@dannash100 dannash100 added this pull request to the merge queue Jun 26, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@dannash100 dannash100 added this pull request to the merge queue Jun 26, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@dannash100 dannash100 added this pull request to the merge queue Jun 28, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants