-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: convert project to use a new source behavior #1015
Conversation
|
||
For example, run this command with the "--behavior decomposePermissionSet" flag to start decomposing permission sets when you deploy or retrieve them. Decomposing means breaking up the monolithic metadata API format XML file that corresponds to a metadata component into smaller XML files and directories based on its subtypes. Permission sets are not decomposed by default; you must opt-in to start decomposing them by using this command. When the command finishes, your "sfdx-project.json" file is updated to always decompose permission sets, and the existing permission set files in your local package directories are converted into the new decomposed format. You run this command only once for a given behavior change. | ||
|
||
For more information about the possible values for the --behavior flag, see the "sourceBehaviorOptions" section in the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm topic. |
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.
Just confirming this is going to be updated (cc @jshackell-sfdc)
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.
My initial thought when I reviewed the help was to NOT include the Beta
label in the --help
because then we have to remember to update it for GA. But if you think it's better to show it now, then that's fine. I realize that the example wouldn't work in its original form until GA...
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.
Well, the command does tell you what the correct behavior names are in the error message:
> sf project convert source-behavior --behavior decomposePermissionSet
Warning: This command is currently in beta. Any aspect of this command can change without advanced notice. Don't use beta commands in your scripts.
Error (2): Expected --behavior=decomposePermissionSet to be one of: decomposeCustomLabelsBeta, decomposePermissionSetBeta, decomposeSharingRulesBeta, decomposeWorkflowBeta
See more help with --help
...but the See more help with --help
would be confusing if we don't update them to the correct names (with Beta)
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.
Oh sorry, and by "this", I meant the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm docs page. It does not currently have a sourceBehaviorOptions
section
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.
I checked in an update with that new section last week, it should show up tomorrow. Cross your fingers!
}); | ||
|
||
if (!flags['preserve-temp-dir']) { | ||
await rm(TMP_DIR, { recursive: true }); |
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.
🔴 This is not working, when I use --dry-run
without --preserve-temp-dir
I have a directory call DRY-RUN-RESULTS
. It looks like the value of TMP_DIR
is decompositionConverterTempDir
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.
yes, intentional. DRY-RUN-RESULTS
is not the TMP_DIR.
You'd want to see what would have ended up in your project if you use --dry-run
. Not just the filenames, but the contents of those files.
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.
I see. I do see the distinction now. I added a simple change to the --help
to specify where the dry-run files will be created
https://github.com/salesforcecli/plugin-deploy-retrieve/pull/1015/files#r1617872864
QA NOTES
Edit:
|
yeah, the metadata API doesn't provide child-level responses for PermissionSet because there aren't any. The response can't tell you what child actually changed. The other types can, so we use that. Open to alternative ways of handling it, but I couldn't think of a good one. |
Co-authored-by: Willhoit <iowillhoit@users.noreply.github.com>
Co-authored-by: Willhoit <iowillhoit@users.noreply.github.com>
What does this PR do?
adds command
project convert source-behavior
mostly uses only NUTs to test (local-only project is reasonably quick)
What issues does this PR fix or reference?
@W-15639938@