Is your continuous integration (CI) job not deploying an item you expect it to?
Is your CI job showing changes that repeatedly do not get deployed to the target?

If so, then it's possible that one or more problem analyzers are removing items from the deployment of your CI job run. This article will help you check to see if this is the case and then explain what you can do.

Explanation 1 - Problem analyzers

When you run a manual compare and deploy, after the items to deploy are selected and before the deployment package is created, the problem analyzers kick in. Problem analyzers are Gearset suggestions for your deployment package, to add or remove any components that help make your deployment more likely to succeed. You can choose to tick or un-tick any of these suggestions in order to modify your package.

In a CI job scenario, since it is an automated process, all the suggestions are automatically ticked (which may add or remove components to the package). It will then proceed with the deployment. This is the most common reason that items are not deployed in a CI job. 

If you would like to verify that problem analyzers are the reason that your item is not being deployed via the CI job, you can view the problem analysis results for the CI job run, as described below. (Alternatively, you can run a manual comparison with the same source and target, using the same metadata filter, and click through to see the problem analyzers being triggered.)

View problem analysis fixes in CI job history  

To see what the problem analyzers are doing under the hood with your CI job, navigate to View history for the job in question from the Continuous integration dashboard. There, you will see a history of your CI job runs with the option to view problem analysis fixes. (The button will be gray if there are no fixes to display.) 

Here's where to find it:

Problem analyzers applied will be shown like this:

This view shows you which problem analyzers made changes to your job, and which items were affected.

Note: You won't be able to edit anything on this page - it's purely for informational purposes. If you want the CI job to accept the problem analyzers, you can use the feature of the Problem analyzer templates.

Explanation 2 - custom metadata filter

Sometimes the real cause is the custom metadata filters are most likely excluding metadata objects that other metadata objects depend on.

Here's an example error to illustrate this:

Asset_Automation_Alerts Flow myWaitEvent_myWait_myRule_3_event_2_SA1 (Action) - We can't find an action with the name and action type that you specified.

This is an unhelpful message saying that some action in your Flow references an object not found.

You go to the View Problem Analysis Fixes and select Items that depend on something that isn't on the target and discover that Gearset suggested that

Remove items that reference Asset (CustomObject), which is not available on the target

Those are your newly-added email alerts in your Flow. They were excluded because they reference Asset which had been excluded from the CI custom metadata filter.

Editing the custom metadata filter to include Custom Object Asset fixes the CI issue.

What can I do if I want something different?

If you want to deploy the changes to the target

The quickest way to do this is to use the manual deployment process to deploy the items that have not been deployed in the CI job, and un-tick the problem analyzer after reading the reason for it. Note that this may result in a deployment error/failure, as that is after all the purpose of the problem analyzer in the first place. You may need to address the Salesforce deployment errors in order to deploy successfully.

If you don't want to deploy the changes to the target

You can also choose to not deploy specific items into the target. To remove an item from being included in future job runs, you may edit the metadata filter in the CI job setting to exclude those components from showing up in future.

If you have any questions about this process, please don't hesitate to ask us in the in-app chat!

Did this answer your question?