Skip to content

docs: recommend against --strict in migrate documentation#740

Merged
morgo merged 5 commits into
block:mainfrom
morgo:update-strict-docs
May 1, 2026
Merged

docs: recommend against --strict in migrate documentation#740
morgo merged 5 commits into
block:mainfrom
morgo:update-strict-docs

Conversation

@morgo
Copy link
Copy Markdown
Collaborator

@morgo morgo commented Apr 30, 2026

The default idempotent restart behavior is safer and more convenient for most users. --strict was added for a specific internal use case and can cause unexpected failures when checkpoints become stale.

This updates the docs/migrate.md to:

  • Add a prominent warning recommending against --strict
  • Explain the specific failure scenarios where strict mode causes errors
  • Clarify that the default behavior (clean up and restart) is usually correct

Fixes #736

The default idempotent restart behavior is safer and more convenient
for most users. --strict was added for a specific internal use case
and can cause unexpected failures when checkpoints become stale.

Document the specific failure scenarios and recommend the default
behavior instead.

Fixes block#736
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the migration documentation to discourage use of --strict and clarify how default restart behavior handles stale checkpoints, aligning guidance with the tool’s safer idempotent resume/restart approach.

Changes:

  • Add a prominent warning that --strict is generally not recommended.
  • Document concrete failure scenarios where strict mode exits instead of restarting.
  • Clarify that the default behavior cleans up stale checkpoints and restarts, usually the desired outcome.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/migrate.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Kiran01bm
Copy link
Copy Markdown
Collaborator

Other places that needs updating ?

  1. pkg/migration/resume-from-checkpoint.md -- recommends --strict with caveats:

    • Line 59: "Use --strict mode if losing progress silently is unacceptable."
    • Lines 62–71 ("Strict mode" section): describes --strict neutrally as a feature to enable, with no caveat that it is not recommended for general use.
  2. pkg/migration/migration.go (line 44) — Kong CLI help string for the flag:

    Strict bool `name:"strict" help:"Exit on --alter mismatch when incomplete migration is detected" optional:"" default:"false"`

The help text does not mention that the flag is discouraged. Since spirit migrate --help is most users' first exposure to the flag, it should reflect the same "not recommended" framing as docs/migrate.md.

Address Kiran's suggestions:
- Update CLI help string for --strict to note it is not recommended
- Update resume-from-checkpoint.md to add caveats to --strict
  recommendations and reframe the Strict mode section
@morgo morgo enabled auto-merge May 1, 2026 00:36
@morgo morgo merged commit 4d41b74 into block:main May 1, 2026
12 of 13 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.

Update docs to recommend against --strict

3 participants