Skip to content

docs: data-revision atomicity; upgrade waits on /ready (#366) - #370

Merged
stevenpickles merged 3 commits into
devfrom
130-migration-atomicity-ready-check
Nov 30, 2026
Merged

stevenpickles merged 3 commits into
devfrom
130-migration-atomicity-ready-check

Conversation

@stevenpickles

Copy link
Copy Markdown
Owner

Summary

  • docs/DEVELOPMENT.md: data-only revisions are atomic inside the engine.begin() transaction; DDL before the first DML may fall outside it (0021: temp-table drop/create only); a data revision should carry a rollback test like 0021's test_a_failed_run_rolls_back_whole.
  • docs/INSTALL.md 8.1: loop still polls /health; after it, /ready is checked once (200 = done, 503 = migration failed: read the log, restore the backup). Snippet uses the same in-container python urlopen, which exits non-zero on 503.
  • planning/roadmap.yaml: slice 130 entry, status merged.

Verified in code

  • app.py lifespan runs initialize_database before the server listens, so during a migration requests get connection refused, not 503.
  • A failed migration does not abort startup; db/startup.py leaves the database subsystem not-ready, so v1.py /ready answers 503, while /health still answers.

Closes #366

🤖 Generated with Claude Code

https://claude.ai/code/session_01JFZvpNYnicPHv6pjHTVK2f

@stevenpickles
stevenpickles merged commit 2a29ff8 into dev Nov 30, 2026
14 checks passed
@stevenpickles
stevenpickles deleted the 130-migration-atomicity-ready-check branch November 30, 2026 15:31
@stevenpickles stevenpickles mentioned this pull request Nov 30, 2026
20 of 28 tasks
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.

Docs: distinguish atomic data-only Alembic revisions from non-transactional DDL revisions; upgrade check should use /ready

1 participant