CMG-1101: fix delta reference resolution and locale-migrated tracking - #1127
Closed
chetan-contentstack wants to merge 2 commits into
Closed
CMG-1101: fix delta reference resolution and locale-migrated tracking#1127chetan-contentstack wants to merge 2 commits into
chetan-contentstack wants to merge 2 commits into
Conversation
added 2 commits
July 31, 2026 12:13
…le-migrated tracking Reference fields (Link/Array Entry) written during a locale-localize restart kept the source CMS entry id instead of the real Contentstack uid, since only the master-locale bulk import resolved references correctly. Threads entry uid-mapper data into the update config so entry-update-script.cjs can resolve them, mirroring the existing asset uid resolution. Also fixes a bug where finishing any locale marked ALL configured locales as migrated, causing not-yet-migrated locales to be silently skipped on later delta restarts. Now only locales actually processed in that run are recorded.
Was reading a literal .id property on the entryId map instead of the dynamic key, so the single-reference branch never took the array path when the mapper legitimately held an array of destination uids.
chetan-contentstack
force-pushed
the
bugfix/cmg-1101-delta-ref-locale
branch
from
July 31, 2026 06:43
a88af5e to
f901d5e
Compare
Author
|
Superseded by fresh branch off dev — see new PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Jira Tickets
Parent story: CMG-789 — Delta Migration | v1.0.0 | Update Feature Implementation
📋 PR Type
📝 Description
What changed?
__entryMapping__and remaps Link(Entry) uids inentry-update-script.cjs.updated-entries.json.contentful.service.ts:439:Array?.isArray(entryId?.id)→Array.isArray(entryId?.[id]).Why?
Reproduced with the bundled
contentful-export.json/-v2.json/-v3.json: on iteration 2 the destination reference field went empty and the newly-added locale had zero entries.🧩 Affected Areas
api— Node.js backenduiupload-apidocker/docker-compose🧪 How to Test
Use the three bundled fixtures.
contentful-export.json(1 locale, 2 refs). Confirm both refs resolve in destination.contentful-export-v2.json(addsen-IN, updates one entry's title). On Map Entry, select the changed entry. After migration, confirm refs still resolve inen-USanden-INis populated.contentful-export-v3.json(addsen-GB, addsrelatedArticlesref). Confirm bothauthorandrelatedArticlesresolve in all three locales.cd api && npm testpasses.📸 Screenshots / Recordings
authorref empty in destination after re-mappingen-INlocale has 0 entriesen-INpopulated for every entryrelatedArticlesempty across locales🔗 Related PRs / Dependencies
✅ Author Checklist
bugfix/cmg-1101-delta-ref-locale.env/example.envupdated — N/Anpm testinapi/)README.md/ docs updated — N/A👀 Reviewer Notes
api/src/andapi/tests/.