Migrations silently swallow failures — partial schema upgrades leave server running on broken DB #107
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in
04ce096. Migrations now run throughschema_migrations(filename + applied_at), each migration in its own transaction. Failuresprocess.exit(1)unlessMIGRATIONS_ALLOW_FAILURES=1is set, so the orchestrator restarts instead of serving traffic on a broken schema.MIGRATIONS_FORCE=1re-runs migrations when iterating locally.zgaetano referenced this issue2026-05-26 18:22:49 -04:00
Fix Plan — #107 Migrations silently swallow failures
Root cause:
src/index.js:105-111wraps each migration in try/catch, console.error, continues loop. Failed migration → partial schema → API starts on broken DB.Fix:
Also add retry-with-backoff (5 tries × 2s) for
loadS3ConfigFromDb()atindex.js:116.Files:
src/index.js:105-120Effort: ~30min
**Priority: P0 — data integrity