Replies: 16 comments 33 replies
-
Sounds interesting! |
Beta Was this translation helpful? Give feedback.
-
The few example 'feature requests' that you linked to are probably 90% of the reasonable use cases for decomposed metadata. And to be clear: Permission Sets and Custom Labels are the only ones you should spend much time thinking about. Profiles are the third rail for a million other reasons, and both Workflow Rules and Profiles are on a slow path to deprecation. I think the Cons are pretty significant. It's like adding a million feature flags all at once and if history is any guide with regard to the CLI and edge cases around metadata support, this will make for a never ending gift of problem reports and difficult to reproduce unexpected behavior. (That wasn't meant to be a jab -- just being realistic) Isn't the In summary: The items listed in the Pros section sound mostly of interest to people who are knee deep in CLI plugin development, not to end users of the CLI who aren't immersed in the nuances of metadata types and have no interest in becoming immersed :-) |
Beta Was this translation helpful? Give feedback.
-
This feature is going to be awesome. |
Beta Was this translation helpful? Give feedback.
-
I see these transformations as some kind of prettier/lint tool for how xml files could be decomposed/composed. Since xml diffs are something difficult in git, maybe this could become a new standalone tool that would work on any type of xml schema. Input: set of rules to instruct the tool to break xml into files and/or subdirectories in a json format. |
Beta Was this translation helpful? Give feedback.
-
Having Labels, Permission Sets, Profiles, etc. decomposed would be really great. As @daveespo said, if you cover those, then most folks will never have to go any further than that. Maybe if those particular metadata types had some first-class support with flags to enable decomposing them rather than directly including bits of the metadata registry config, this would make it more friendly for 99% of users and suggest which cases are important for other tooling to support. Tooling support is absolutely the one to watch here for me. One of the triumphs of DX and the CLI is the common source format. Today, I can easily switch my tooling choices and that's fine because everything is in DX format in git so the method of getting metadata in and out is fairly interchangeable. For example, as a consultancy, we can come in and build a project for a customer using tooling that's as expensive as we're willing to pay for. And, because we leave them with a repo in SFDX format, they can do their day-to-day maintenance/improvements with DevOps Centre or an alternative expensive tool. Our choices don't end up coupled. Constraining that tooling choice is something that I'd be very wary of. |
Beta Was this translation helpful? Give feedback.
-
I really love that ! Lot's of issues with XML merging, creating conflicts that should not be conflicts, especially around picklist values, and record types. One thing I'm wondering is, is there any impact on packaging ? |
Beta Was this translation helpful? Give feedback.
-
I think it is a very good idea.
I've always wondered why doing this only for CustomObject and not for everything else 🤔 Focus on the impacted metadata typesIn sfdx-git-delta we treat all those whole metadata definition located inside a holder file with a specific transformer so we can deal with them unitarily and recompose the holder file with only what as changed between 2 revisions. Here is the list of kind of metadata we have identified during our exploration:
Some of the metadata are just "scopeable" (they can be deployed partially) but cannot be listed in the
Focus on Pros and ConsAs usual, the complexity lives in the details 😈 , I cannot foresee what issues it could have in the future with new metadata kind and specific customer usage, but here are my thoughts:
My 2 centsI would apply the " |
Beta Was this translation helpful? Give feedback.
-
It seems interesting, while it does not require additional configuration (metadata split should be opiniotated -> same for everyone activating the option), and more important: respect ascending compatibility with existing projects :) |
Beta Was this translation helpful? Give feedback.
-
If we are going to open up an interface to allow for the customization of how metadata files are decomposed and synthesized, we would be ultimately making room for any arbitrary transformation to any metadata component, including going from XML to other, human-friendlier formats. Even if transformation is in the far-future backlog, in order to handle the synthesis-transformation-decomposition, we need a stronger semantic layer for metadata (robust TypeScript types for metadata, wink wink) that is used by all plugins, instead of relying on a canonical representation in XML. |
Beta Was this translation helpful? Give feedback.
-
a little teaser |
Beta Was this translation helpful? Give feedback.
-
Not trying to step on anyone's feet here, but I did write up a custom plugin that handles decomposing most of the metadata listed throughout this chain. I started this as a pet project in Python for my own team and then I wanted to take a stab at creating a CLI plugin for the 1st time. I didn't see this thread till after the fact. Willing to talk to someone on the Salesforce CLI team if there is any overlap/conflicts or any desire to contribute to my plugin - https://github.com/mcarvin8/sfdx-decomposer-plugin We could keep this concept as a plugin and integrate CLI hooks to automate the conversion back and forth (@AllanOricil 's idea not mine). Keep the CLI structure the same and just have people install a plugin if they wish to decompose specific metadata further. |
Beta Was this translation helpful? Give feedback.
-
Any sneak peek we can get on the roadmap of types to support? I would like to bring forward this other issue that captured some types that would also be interesting, the following ones would be the remaining of the mentioned ones leaving out the ones already covered in the beta
|
Beta Was this translation helpful? Give feedback.
-
I think we should distinguish what is listable atomically (like We could distinguish them as
Per example, we could categorize the existing ones the following way:
I think we should consider those mdtypes as well to be
|
Beta Was this translation helpful? Give feedback.
-
While testing
|
Beta Was this translation helpful? Give feedback.
-
@mshanemc - Can we look into updating the Custom Labels custom registry to not add decomposed labels into a new This is something I ran into with my decomposer plugin, which I resolved by doing some file-moving operations with the labels files during decomposing and recomposing. |
Beta Was this translation helpful? Give feedback.
-
Closing RemarksThank you all for participating in this discussion. Your ideas and perspectives greatly contributed to finalizing this feature. Final DesignWe decided not to support custom registry variants. Instead, some metadata types will have a fixed source decomposition option that users can choose to enable on a project-by-project basis. This ensures consistency across SFDX projects that enable these options, simplifying troubleshooting, support, and maintenance of the Salesforce CLI. As a result, it's more important than ever that we get the design right for new source behaviors offered by the CLI. Process for Releasing New Source Behavior Options
Thank You!Thanks again for your collaboration. We're incredibly grateful to this community for your help and support! |
Beta Was this translation helpful? Give feedback.
-
You know how CustomObject is a metadata API type, but the CLI breaks it down into individual files for CustomField, ValidationRule, etc? But other types look the same as the mdapi uses, except the extension?
That's because of the Metadata Registry which defines how all the types should behave.
We have a number of requests to do that process differently.
#1159
#2356
#2376
forcedotcom/source-deploy-retrieve#1145 (the PR is using a different strategy, but Registry Variants would get most of the way where it's headed--if a Profile is retrieved without certain elements, those files would not be deleted)
Changing these is painful (breaking changes to how deploy/retrieve behave, etc). And trying to get consensus on these among customers is going to be hard ("hey, it was fine before...why'd you change i!?")
my idea: put your own registry fragments in your
sfdx-project.json
Use case: 2376 wants to break permissionSets into individual files.
Obviously, we'd have several tasks to do:
Pro
latest
? You can make some custom registry types to handle those!)Con
Beta Was this translation helpful? Give feedback.
All reactions