Check failed-migration schema version against its prior value
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m28s
Foundation / checks (postgres) (push) Failing after 40m43s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

The upgrade rehearsal asserted the schema stayed at version 23 after a
deliberately failing migration, but migrations now reach 33, so it
reported "schema version moved" although nothing changed. Record the
version before the failing migration and compare against that. Refresh
the dev session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-12 16:28:57 -04:00
co-authored by Claude Opus 5.5
parent fcccdf552f
commit bf5dcc7a6e
2 changed files with 4 additions and 2 deletions
@@ -12,7 +12,7 @@ spec:
env:
- {name: REGION_SESSION, value: "dev"}
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261012T194122-12341:1791835282"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261012T202838-20650:1791838118"}
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
ports:
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
+3 -1
View File
@@ -48,6 +48,7 @@ wait_ack "$work/b1.log" 30 || fail "b1 acknowledged nothing"
# 1. A failing migration while b1 serves.
before="$(max_ack "$work/b1.log")"
schema_before="$(q -c 'SELECT max(version) FROM evolution.schema_migrations')"
code=0
q -v ON_ERROR_STOP=1 > "$work/migration.log" 2>&1 <<'SQL' || code=$?
BEGIN;
@@ -61,7 +62,8 @@ SQL
[ "$code" != 0 ] && grep -q 'division by zero' "$work/migration.log" || fail "the rehearsal migration did not fail"
[ "$(q -c "SELECT count(*) FROM information_schema.columns WHERE table_name = 'region_commits' AND column_name = 'rehearsal_column'")" = 0 ] ||
fail "the failed migration left a column"
[ "$(q -c 'SELECT max(version) FROM evolution.schema_migrations')" = 23 ] || fail "schema version moved"
[ "$(q -c 'SELECT max(version) FROM evolution.schema_migrations')" = "$schema_before" ] ||
fail "schema version moved"
wait_ack "$work/b1.log" $((before + 40)) || fail "b1 did not resume after the failed migration"
kill -0 "$b1_pid" 2> /dev/null || fail "b1 exited during the failed migration"
bash "$root/tools/migrate-postgres.sh" > /dev/null || fail "migrate after the failure"