Force cancel a task
If you want to remove tasks that are stuck and cannot be canceled due to failing steps, you can use the force cancel option. It is intended to use force cancel only as a last resort option to clean up tasks.
To force cancel a deployment task from the GUI, you must have the admin global permissions. The force cancel action sets the task to a cancelled state, deletes all related files, and skips all the failed steps.
- Force cancel ignores failures on any step. If any errors occur during a Register deployeds step, the force cancel ignores these errors and continues with the next steps. This action can create inconsistencies between the repository and the target environment, because some CIs might not be registered.
- Force cancel, like the normal cancel task option, cannot be used on executing tasks.
To force cancel a task:
- Click Explorer and go to Monitoring in the left pane.
- Double click Deployment tasks.
- In the list of tasks, identify the task you want to cancel.
- Click and select Force cancel.
The force cancel option has the same functionality as the cancel task option, with the following differences:
- All the pending steps in
runAlwaysphases will still be tried in their regular order. If a step fails, the execution continues with the next step instead of stopping the deployment task. You can see a message in the logs containing this information.
- The force cancel action ignores Paused steps.
- Failed steps in a
runAlwaysphase will not be retried. This is done to ensure the possibility of task progress: a step in a
runAlwaysphase can still get stuck. In this case, you can abort the execution, which makes the step go to failed state, and then click force cancel again. The stuck step will not be run again.
- The task is archived as force cancelled and is marked in the logs that it was force cancelled. If all steps succeed normally during force cancel, the task will be marked as cancelled.