What is a validation?
A validation is essentially a dry run of a deployment. Salesforce checks that your changes would deploy successfully to the target org and runs your Apex tests (where applicable), but doesn't actually change anything in the org.
How long a validation takes varies, but Apex tests are usually the biggest factor. Depending on how your Pipeline is configured and what's in the package, tests alone can add hours. That's where quick deploy comes in.
What is quick deploy?
Quick deploy is a Salesforce feature that deploys a package you've already validated, without running its Apex tests again. The tests passed during validation, so they don't need to run a second time.
Quick deploy only skips the tests. Your metadata is still deployed to the org as normal, and Gearset still compares your source and target first to make sure the comparison result hasn't changed since validation. The deployment won't be instant.
This means quick deploy only saves time when your tests take a long time to run. If your deployment doesn't run any tests, there's nothing to skip, and a normal deployment is just as fast.
Can Pipelines utilize quick deploy?
Yes. Gearset uses quick deploy for the final deployment after your PR is merged, as long as all the conditions for quick deploy are met. Your validations still run your tests as normal. Quick deploy is what lets the final deployment skip running them again.
Skipping validation vs quick deploy
Pipelines has two separate ways to avoid repeating work, and they happen at different points in a promotion:
Skipping validation happens before the merge. When you click Promote changes, Gearset can skip validating again if nothing has changed since your PR was last validated.
Quick deploy happens after the merge. It lets the final deployment skip running your Apex tests again.
One can happen without the other, or they both happen sequentially.
How a promotion works
PR opened. Gearset validates the promotion branch against the target org.
Promote changes clicked. Gearset checks whether the earlier validation still applies. If it does, the validation is skipped, as long as all the conditions for skipping validation are met. If not, Gearset validates again.
PR merged and deployed. Gearset merges the PR and deploys it, using quick deploy as long as all the conditions for quick deploy are met.
For the full detail, see Promoting a change through your Pipeline.
Conditions for skipping validation
All of these need to be true since the last validation:
The last validation passed.
Comparing the promotion branch with the target org gives exactly the same result as it did at the last validation. A change on either side can affect this.
No changes to the CI job's test settings.
If your package only contains CPQ or Vlocity changes, Gearset skips the validation, as Salesforce can't validate data in the same way.
Conditions for quick deploy
All of these need to be true between the last validation and the deployment:
Nothing has changed in the target org.
No other deployments, even unrelated ones. This includes installing or upgrading managed packages.
No changes made directly in the org that could affect your package. Salesforce doesn't define exactly which direct changes count, so we can't say for sure.
Your package hasn't changed.
No new commits on the promotion branch, including commits synced from the feature branch.
No other PRs merged into the environment branch.
No changes to the CI job's metadata filter.
Your tests ran and passed.
The validation ran Apex tests and they all passed.
Your tests meet Salesforce's 75% code coverage requirement.
No changes to the CI job's test settings.
The validation ran less than 10 days ago.
The package doesn't contain CPQ or Vlocity changes.
If any of these aren't met, Gearset runs a normal deployment and your tests run again. This is a Salesforce requirement.
Improving your chances of a quick deploy
Promote soon after validation passes.
Avoid deploying to the org from outside Pipelines, for example change sets, manual comparisons or other tools.
Keep direct changes to the target org to a minimum.
Promote related PRs together, so they share one validation and one deployment.
FAQs
Why does Gearset validate again when I click Promote changes?
This happens when one or more of the conditions for skipping validation aren't met. The most common cause is other PRs being merged into the environment branch before yours. Gearset brings those changes into your promotion branch with a semantic merge, so the earlier validation no longer matches. In busy environments, expect this most of the time.
Why can I see a Quick Deploy button in Salesforce when Gearset didn't use it?
Salesforce shows the Quick Deploy button for any validation that meets its own rules: tests passed, nothing deployed since, and less than 10 days old. Salesforce can't see your Git branches, so it doesn't know whether that validation still matches what's on your environment branch.
Gearset only quick deploys when the validation matches exactly what's about to deploy. If other PRs have been merged or a semantic merge has added changes, the earlier validation is out of date, even if Salesforce still shows the button.
We don't recommend using the Salesforce button for Pipelines changes. It deploys outside Gearset, so your org can end up out of sync with source control.
When the PR is merged, the CI job will still run a deployment. Because your changes are already in the org, this deployment is usually smaller, or empty if nothing else differs. An empty deployment shows as successful with 0 components.
If there are still differences to deploy, for example changes added by a semantic merge, they deploy as a normal deployment and your tests run again.
Why isn't quick deploy used when my package has no Apex?
If the CI job doesn't run tests, there's nothing for quick deploy to skip, so Salesforce won't use it. This doesn't slow anything down. A normal deployment with no tests is just as fast.
Can I see within Pipelines if my deployment used quick deploy?
Yes. Each CI job has a View job performance page. Under the Deployments tab, it shows details for each deployment, including whether quick deploy was used. This article explains how to find it.
If you have any questions, get in touch through the in-app chat. We're always happy to help.
