-
Notifications
You must be signed in to change notification settings - Fork 10
Bugfix/aem cmg 1110 #1146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Bugfix/aem cmg 1110 #1146
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1387,9 +1387,18 @@ const createEntry = async ({ | |
| ? uidCorrector(`${parseData.title}_${parseData.templateType}`) | ||
| : uidCorrector(parseData.templateType); | ||
| } | ||
| const uid = modelId && !usedEntryUids.has(modelId) | ||
| ? modelId | ||
| : uuidv4?.()?.replace?.(/-/g, ''); | ||
| // A stable modelId already seen earlier in this same run means this file is a | ||
| // duplicate export of a page already processed (AEM can emit both a page's generic | ||
| // model and its template's structure/model definition as separate files sharing the | ||
| // same id β see CMG-1112). Skip it instead of minting a fresh random uid: a random | ||
| // uid here would create a second, permanent duplicate entry that mints yet another | ||
| // untracked random uid (another duplicate) on every subsequent delta iteration, | ||
| // since it can never match anything recorded in entry_mapper. This mirrors | ||
| // extractEntries's collision policy in upload-api's migration-aem. | ||
| if (modelId && usedEntryUids.has(modelId)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocker: the winner of a collision is whatever the filesystem happens to yield first, so this can keep the template/structure node and drop the real page.
Failure scenario, using this PR's own example: Suggested fix: make the tie-break explicit rather than incidental β prefer the file that is actual content (e.g. the one with Generated by Claude Code |
||
| continue; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: this is the only skip in the loop that leaves no trace. The await customLogger(
projectId,
destinationStackId,
'warn',
getLogMessage(srcFunc, `Skipped duplicate entry from "${fileName}": uid "${modelId}" already used in this run.`, {})
);
continue;Generated by Claude Code |
||
| } | ||
| const uid = modelId || uuidv4?.()?.replace?.(/-/g, ''); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocker: Two ways distinct files collide on
Suggested fix: key the set on Generated by Claude Code |
||
| usedEntryUids.add(uid); | ||
| const title = getTitle(parseData); | ||
| const isEFragment = isExperienceFragment(parseData); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,9 @@ | |
| background-color: $color-base-white-5; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: flex-start; | ||
| // Stretch (not flex-start) so the path row keeps the container's full width β flex-start | ||
| // let it shrink-to-fit for short/invalid paths, visibly narrowing the input (CMG-1113). | ||
| align-items: stretch; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: this correctly removes the shrink-to-fit (
Also pre-existing while you're in this block: Generated by Claude Code |
||
| margin-left: 20px !important; | ||
| border: 1px solid $color-brand-fail-base; | ||
| border-radius: var(--TermCount, 5px); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the symbols this comment leans on don't exist in this repo, so the reasoning can't be checked.
extractEntriesandentry_mapperreturn no hits anywhere in the tree, andupload-api/migration-aemhas no entries lib at all (onlycontentType,locales,validate) β same foruid-mapperreferenced by the older comment at line 1375. If these mean the Contentstack CLI's import mapper files rather than code in this repo, worth saying so explicitly; as written, "this mirrors extractEntries's collision policy in upload-api's migration-aem" points a future reader at something they can't find, and the PR description repeats it.Generated by Claude Code