One of the unique features of Gearset is its understanding of your metadata and how it can suggest improvements to your deployments to make them more likely to succeed. This guide will give a brief overview of how the problem analysis works, and how to interact with the results.
Because there are so many possible interactions, I won't document them all here! To see a list of our problem analyzers, what triggers them, and how they work, see our section on problem analyzers.
When you'll see the problem analysis
Gearset's problem analysis kicks in when you click Next from a comparison. At this point Gearset will scan the components you selected and look for potential issues such as:
- Missing dependencies
- Incompatibilities between your orgs, such as differences in feature enablement
- API version differences
- Objects which are only partially supported by the metadata API
- Issues with managed packages
This analysis is performed by Gearset, and is not part of the Salesforce package testing. Your metadata is not uploaded to Salesforce at this point - this is all Gearset!
This process usually only takes a matter of seconds, but for large deployments it may take a few minutes.
If Gearset does not detect any issues with your deployment, you will be taken straight to the pre-deployment summary after clicking Next.
Problem analysis types
There are two types of problem analysis:
You can switch between them using the tab in the menu on the left hand side of the problem analysis page
Warnings are issues that Gearset cannot automatically fix by adding or removing components to your package. A common example is that some objects must be deployed in a specific order, as part of several deployments.
To resolve a warning, you must take a separate action before proceeding with the deployment. The warning will give you more information about what to do.
In the screenshot below, the Quote Settings object must first be deployed before the Quote standard object changes can be released. In this case, you would need to run a separate deployment for the Quote Settings object and then retry the rest of the components in the package to resolve the warning.
Fixes are changes that Gearset is suggesting to make to your deployment package to make it more likely to deploy. Fixes fall into one of two categories:
- Adding components to your package
- Excluding components from your package
Fixes can be resolved by looking at the suggestions Gearset makes, and checking the boxes to add or remove components from your package. This is done in Gearset as part of the deployment flow.
Sometimes you may have added some items to your package but forgotten other items they depend on. Without including the dependencies, the deployment will not succeed.
In the screenshot below, for example, I have added a field which is part of a master-detail relationship. The detail field has been added, but the master has not. Gearset has identified this, and recommended that the master object also be included.
By ticking the checkbox, the master field will be added to my deployment package.
Gearset scans for a large number of these kinds of dependencies for the most commonly deployed components, including Profiles, Permission Sets, Custom Fields, Emails and many more.
Some changes cannot be easily deployed to some orgs and should be removed from your deployment package. A common example is a component of a feature which is enabled in the source, but not in the target org.
In the screenshot below, some objects have been selected for deployment which relate to features which are only enabled in the source org. Gearset is recommending that these objects are removed from the deployment.
By ticking the checkboxes, these items will be removed from my deployment package.
As another example, the screenshot below shows a component which is not deployable via the Salesforce metadata API, and so should be removed from the package.
Learning more about object dependencies
For more information on exploring the comparison results to find object dependencies, see the following two help articles:
Overriding the problem analysis
If you wish, you can ignore all of the suggestions made by Gearset's problem analysis and proceed with the deployment unaltered. To do this, simply uncheck any checkboxes in the Fixes tab and click Next.
You will see a warning dialogue - click Continue to summary to move forwards.
Overriding problem analyzers when deploying to source control repositories
Gearset treats repositories like Salesforce orgs - when deploying metadata changes to a source control repository, Gearset will run the problem analyzers as usual to scan for issues. This is to maintain your metadata in a format that can easily be deployed out to a Salesforce org again in the future.
In some cases, however, you may wish to ignore the problem analysis when deploying to source control, as there are far fewer restrictions on what you can deploy to a repository vs a Salesforce org. To do this, simply follow the steps in the section above about overriding problem analysis and deploy as usual.