fix/1834 build does not find shared DEs when run on child BU#2552
fix/1834 build does not find shared DEs when run on child BU#2552JoernBerkefeld merged 6 commits intodevelopfrom
Conversation
…d BU Co-authored-by: JoernBerkefeld <1917227+JoernBerkefeld@users.noreply.github.com>
Coverage ReportCommit:a3fd702Base: develop@9d8ee7e Details (changed files):
|
|
@copilot you misunderstood me. please revert your changes, except for your unrelated fix in lib/index.js before your changes, it couldnt find the shared dataExtension and suggested to the user to download it from the child-bu which is not correct nor possible. instead, it should check if it can find the shared dataExtension in the parentBU's folder and if it does, print a warning mentioning that shared dataExtensions have to be handled in a separate run of build and have to be deployed separately as well - unless source BU and target BU happen to rely on the same shared dataExtension. That would not be recommended but it is technically an option and it's been known to happen. under no circumstances should build include the potentially found shared/synced dataExtension in the deployment package for the child business unit. remember that all of the above only applies if current eid != current mid - or in other words: if we are running build for a source BU other than tasks:
|
Co-authored-by: JoernBerkefeld <1917227+JoernBerkefeld@users.noreply.github.com> Agent-Logs-Url: https://github.com/Accenture/sfmc-devtools/sessions/7111d9b8-5d50-4cdc-8f35-a764875ef429
build --dependencieson a child BU emitted a misleading "Not found in your project folder" warning for shared/synchronized dataExtensions and suggested aretrievethat would never work. The fix checks_ParentBU_for missing DEs and shows a targeted, actionable warning without including the DE in the deployment package.Changes
lib/metadataTypes/MetadataType.jsgetAlternativeFilesToCommithook (which incorrectly added found items to the deployment package) with ahandleNotFoundDependencies(notFound, notFoundList)hookgetDependentFilesnow delegates "not found" handling to this hook; only keys it returns get the generic warninglib/metadataTypes/DataExtension.jsgetAlternativeFilesToCommitandreadSecondaryFolderhandleNotFoundDependenciesoverride (only active wheneid !== mid):_ParentBU_/<type>/for each missing keyshared_dataextension→ warns that it must be built on parent BU and deployed separatelysynchronizeddataextension→ warns that the reference likely needs templating or manual change at deploy timedataextensionon parent BU or not found → falls through to the default "not found" warningmultiTypeKeyList; deployment package for the child BU is unaffectedTypeKeyCombotypedef importlib/index.jsAsset.getJsonFromFSCacheis now always reset afteraddDependentCbReferences, not only when assets were found (pre-existing bug)Tests
buildTemplate --dependenciestest: asserts the shared DE is absent from the template result and that the process still exits cleanlyDocumentation
No documentation changes required.
Issues
Release details
Checklist
Before merge
npm run prepare-release(which runsnpm audit fix,npm run lint-ts,npm run lint:fix,git add,git commit)After merge
npm run version:major/minor/patchOriginal prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.