Repository navigation
ci(sql-migration-gate): re-enable migration-immutability after the 0001 collapse (RIG-4897) - #2244
rigel-mintaka wants to merge 1 commit into
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Compass engineering docs preview: https://compass-native-rig-4897-reen.compass-eng-docs.pages.dev Deployed from |
|
CI at b7c6411: |
* ci(pgtest): raise the job timeout to 30 minutes (RIG-5324) Successful pgtest jobs now take 17.7 to 19.4 minutes. The -race real-Postgres suite alone takes about 17 minutes, and the sqlc-vet bootstrap still runs after it. Two recent jobs were cancelled at 20.2 and 20.4 minutes. In the #2244 run, all 11 Postgres packages had reported ok before the cancel landed during the sqlc-vet bootstrap. Thirty minutes leaves about ten minutes of headroom over the slowest passing run. The per-package go test -timeout of 15m still catches a wedged suite. Ledger-impact: none (CI timeout only; no recorded decision covers it) Co-authored-by: Matt Wilkinson <matt@rigel.build> * ci(pgtest): scope the timeout comment to the one cancelled run on record (RIG-5324) Co-authored-by: Matt Wilkinson <matt@rigel.build> --------- Co-authored-by: Matt Wilkinson <matt@rigel.build>
…01 collapse (RIG-4897) The 0001 collapse suspended the append-only migration check so open migration PRs could fold into 0001_init.sql before the dev database was wiped. The wipe is done and those PRs have merged or are landing, so the gate entrypoint calls checkMigrationImmutability again instead of returning a hardcoded pass for that check. A new test spawns the real gate entrypoint against a fixture repo with an edited base migration and expects exit 1 naming the file, so a future suspension at the call site fails the suite instead of passing silently. Co-authored-by: Matt Wilkinson <matt@rigel.build>
b7c6411 to
2de9020
Compare
Summary
The 0001 collapse suspended the append-only
migration-immutabilitycheck so that open migration PRs could fold into0001_init.sqlbefore the dev database was wiped. This PR turns the check back on.tools/sql-migration-gate/index.ts: the entrypoint callscheckMigrationImmutability(root)again. The hardcoded passing result is removed. The restored line matches the line in place before the suspension.index.test.ts: a new test runs the real entrypoint against a temporary git repo whose base migration was edited. The test expects exit 1 and a FAIL verdict that namesmigration-immutability. If the check is suspended at the call site again, the suite fails.Verification
bun testintools/sql-migration-gate: 38 pass, 0 fail. The new test failed before the fix with exit 0 and the "suspended" note, and passes after it.OK — squawk + sqruff + migration-immutability passed.Risks
Any open PR that still edits a migration from main fails this gate. #2212 edits
0001_init.sql, so this PR stays draft until #2212 merges, and then rebases. Rollback: revert this commit.Compatibility
CI-only. The gate becomes stricter again. Runtime and schema do not change.
Documentation
None: the README already describes the append-only check, and the suspension never changed it.
Ledger-impact: none (restores an existing gate behaviour; no decision changes)