-
Notifications
You must be signed in to change notification settings - Fork 245
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
Add check_components
preflight to detect metadata component conflicts (#3837)
#3837
Conversation
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.
Thanks @vsbharath! This will be a nice tool for pre-deployment checks. However, testing against EDA revealed some issues.
When running cci task run check_components --plan_name install --org dev
, the task fails to detect deploy paths, even though they exist in the customer_org
flow (e.g., unpackaged/pre
and unpackaged/post
). It incorrectly reports "No deploy paths found," indicating a problem with detecting paths in nested flows.
The main issue seems to be with the conditional block—it's hard to follow and doesn't correctly decompose plans and tasks. I recommend reviewing the _freeze_steps method from the metadeploy task. Lantz has already started extracting this functionality in his PR.
For example, both deploy_pre
and deploy_post
handle groups of paths and should be decomposed into individual deploy calls. If you're using the List[dict]
returned by _freeze_steps
, make sure to detect the task_class
class path to handle this properly.
Another suggestion is to merge all package.xml files into one. For projects like NPSP with many deploy calls, this would be much faster. I'm not sure if we've discussed this before as a v2.
Co-authored-by: James Estevez <jestevez@salesforce.com>
I will take a look at it. It still not resolving the steps from the source. Will address these and get back |
Thanks @jstvz for taking the time to review. I have addressed all the comments. Please review and let me know if any changes are required. |
Apologies for more changes. Added few more tests to utils and pushed the changes for review |
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.
LGTM. Additional tweaks suggested below.
Co-authored-by: James Estevez <jestevez@salesforce.com>
@jstvz Addressed all the suggestions. Need your approval one more time. |
check_components
preflight to detect metadata component conflicts (#3837)
Summuray
CheckComponents task is designed to check for existing metadata components in a Salesforce org before deployment, helping to prevent deployment failures due to conflicts with existing components.
Whats Included
Functionality:
Collects metadata components from specified paths or tasks within a plan or flow.
Check if these components exist in the target Salesforce org using the Metadata API.
Options:
Sample Plan and Flow Integration: