Loading

Cancel an in progress deployment or validation

Publiceringsdatum: Aug 20, 2024
Beskrivning

If you want to cancel the deployment in progress for some reason (need to deploy a higher priority update, realize it will fail, or see some failures during validation) there are a number of ways to do so.

What happens when you cancel a deployment

The deployment process is a complex, multi-step process that is designed to preserve data integrity. When a cancellation is received, the deploy completes its current step and then proceeds with the request to cancel the deploy and execute the rollback.

How long does a cancellation take

Because canceling a deployment is a complex, multi-step process, it can take some time to complete. The length of time depends on the deployment payload size, the number of components to roll back, the relationships and dependencies between components, etc. For example, if the deployment is currently processing a single metadata type with many files, the cancel operation may not be triggered for a long time due to the process outlined above.

Why is a canceled deployment still in progress

A canceled deployment may still show as in progress for some time. This behavior happens sometimes because the cancel operation doesn’t directly stop the deployment process. The process goes through several steps and how long it takes also depends on how complex the rollback is.

Check the status of a cancellation

To check the status of the cancellation, call checkDeployStatus(). Also review 'Change Set' validation or deployment stuck in 'In Progress'

 

Lösning

Cancel a deployment or validation
1. From the UI:

  • Go to Setup, then under Environments->Deploy select Deployment Status.
  • Identify the deployment or validation in progress that you wish to cancel.
  • Click the Cancel button next to the in progress deployment or validation to request cancelation.

2. Using REST API: 

  • Authorize to access your org's REST API Resources.
  • PATCH to Rest URI: https://host/services/data/vXX.0/metadata/deployRequest/deployRequestId
    • The body of the request should update the deployRequest status to 'Canceling'
  • For more information, read Cancel a Deployment in Progress Using REST.

3. Using Salesforce CLI:

4. Using ANT migration tool:

 

 

Knowledge-artikelnummer

000392895

 
Laddar
Salesforce Help | Article