Skip to content
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

fix: only scan pkgDirs when merging non-decomposed MD #666

Merged
merged 4 commits into from
Jul 25, 2022

Conversation

cristiand391
Copy link
Member

What does this PR do?

Updates NonDecompositionFinalizer to only scan the package directories in a DX project when merging non-decomposed metadata.
If the defaultDirectory passed to finalize isn't a package dir it will ignore it.

See: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_mpd.htm

What issues does this PR fix or reference?

forcedotcom/cli#1540
@W-11186731@

Functionality Before

NonDecompositionFinalizer scans components in root project dir which causes issues when components are found in other folders (mdapi, etc).

Functionality After

NonDecompositionFinalizer will only scan components found inside of package directories, if the finalizer gets a defaultDirectory that's not a package it will threat it as the target output dir for a transformation and not scan it.

} else {
// defaultDirectory isn't a package, assumes it's the target output dir for conversion
// so no need to scan this folder
allNonDecomposed = [];
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the output dir passed to the converter in the conversion pipeline, if the dir isn't a package in a project SDR don't need to scan it.

new ComponentConverter(targetFormat, this.registry, mergeSet, defaultDirectory),

When running sfdx force:mdapi:convert -r mdapi -d src SDR will not look for non-decomposed metadata in /home/user/dreamhouse-lwc/src.

@WillieRuemmele
Copy link
Member

QA Notes


✅ : issue repository/steps now mdapi:converts CustomLabels
✅ : ignores MPD CLs correctly

@WillieRuemmele WillieRuemmele merged commit 098875f into main Jul 25, 2022
@WillieRuemmele WillieRuemmele deleted the cd/fix-non-decomp-finalizer branch July 25, 2022 15:51
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