Skip to content

docs(resume): document cross-version checkpoint compatibility#832

Merged
Kiran01bm merged 2 commits into
block:mainfrom
Kiran01bm:kiran01bm-improve-docs-res-from-chkpnt
May 10, 2026
Merged

docs(resume): document cross-version checkpoint compatibility#832
Kiran01bm merged 2 commits into
block:mainfrom
Kiran01bm:kiran01bm-improve-docs-res-from-chkpnt

Conversation

@Kiran01bm
Copy link
Copy Markdown
Collaborator

What and Why ?

Adds a "Cross-version compatibility" section to pkg/migration/resume-from-checkpoint.md explaining that checkpoint tables are version-specific by design.

Spirit deliberately uses SELECT * when reading the checkpoint table so that any schema drift (columns added, removed, or reordered in a newer release) fails the read. This is intentional — silently reading a checkpoint with a different schema risks misinterpreting fields and corrupting the migration. The behavior was previously documented only in a Go comment in runner.go (resumeFromCheckpoint) and was not surfaced in the user-facing markdown.

What the new section covers

  • Why SELECT * is intentional and what it guards against.
  • Upgrade mid-migration (older binary → newer binary) and rollback mid-migration (newer → older) both fail the read.
  • Non-strict mode falls through to newMigration() and restarts the copy from scratch silently.
  • Strict mode currently surfaces this as a generic "could not read from table" error rather than a typed status.Err… value (called out as a known observability gap).
  • Operational guidance:
    • Finish in-flight migrations on the same Spirit version they were started with.

Scope

Docs-only change. No code or test changes.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17679f43ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pkg/migration/resume-from-checkpoint.md Outdated
@Kiran01bm Kiran01bm merged commit 1dd78ab into block:main May 10, 2026
9 of 11 checks passed
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