Skip to content

migrate --incremental: stop patching deprecatedDate in the lifecycle fast path - #36

Merged
durw4rd merged 2 commits into
mainfrom
fix/incremental-deprecated-date
Oct 20, 2026
Merged

durw4rd merged 2 commits into
mainfrom
fix/incremental-deprecated-date

Conversation

@durw4rd

@durw4rd durw4rd commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #32. The incremental fast path (lifecycle/tags reconciliation for flags whose versions are unchanged) still emitted a stand-alone replace /deprecatedDate, which the API rejects with "Unsupported json-patch operation". Since 3.4.0 counts a failed lifecycle reconciliation as an error, every --incremental run would fail each already-deprecated flag and exit 1.

Found by an incremental dry run against the SoSafe projects right after the first real migration: 5 deprecated flags were about to get a 1-operation lifecycle patch although they were already deprecated in the destination.

Fix: drop the deprecatedDate comparison from the lifecycle patch, mirroring the flag-level fix in #32. deprecated and archived are still reconciled.

Tests: 182 passed; deno check clean.

🤖 Generated with Claude Code

durw4rd and others added 2 commits October 20, 2026 16:56
…fast path

Same root cause as the 3.4.1 flag-level fix: a lone replace /deprecatedDate is rejected
by the API, so every incremental run failed each already-deprecated flag (5 in the SoSafe
project) and exited 1. Found in the incremental dry run after the first real migration.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrow change removes the rejected operation while preserving supported reconciliation, with no identified blocking issues.

No open issues 🎉

What changed in this PR

Fixes incremental migration failures by extending #32’s removal of unsupported deprecatedDate patches to the unchanged-flag fast path.

Changes:

  • Removes timestamp reconciliation while preserving lifecycle-state and tag updates.
  • Bumps the version to 3.4.2 and documents the fix.
File Description
src/​scripts/​launchdarkly-migrations/​migrate_between_ld_instances.ts Removes the unsupported timestamp patch.
deno.json Updates the version to 3.4.2.
CHANGELOG.md Documents the incremental migration fix.

Review effort: Balanced

@durw4rd
durw4rd merged commit 7692049 into main Oct 20, 2026
3 checks passed
@durw4rd
durw4rd deleted the fix/incremental-deprecated-date branch October 20, 2026 15:26
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