Follow-up: Add 'manual' to the `CANCELABLE_STATUSES` constant
Original Description
-
@mfanGitLab started a discussion: @allison.browne maybe as a follow-up we can just add
:manual
toCANCELABLE_STATUSES
as it's never used without this add-on
Problem
In the MR this came from where canceling
status was introduced, it was actually a mistake to add manual
to the statuses that can transition to canceling
/canceled
to the state machine for jobs. It's an innocuous one since it doesn't really matter if a manual job is canceled. It doesn't change the behavior of the job to cancel it (unlike for jobs with a completed status).
Historically, all manual builds/pipelines were not cancelable. We allowed manual pipelines to be cancelled to avoid deadlocks deleting projects because sometimes pipelines that were considered manual would have cancelable state jobs. !81266 (diffs)
We also currently cancel manual
status jobs to be cancelled when a pipeline is cancelled because we neglect to check if a job is cancelable before canceling it in the pipeline cancellation service.
We discussed on the MR that it would simplify the code from a product and code standpoint to just allow manual jobs to be cancelable. !159776 (comment 2218747088)
We also have some customer/engineering requests for this:
However, both of those issues assume a manual
status job won't be playable once it's cancelled. Which would need to be another iteration or another status like deactivated
status.
Proposal
Allow manual
status jobs to be cancelled from the UI by adding them to CANCELABLE_STATUSES
for the job.
Follow up to:
Allow scheduled
status jobs to be cancelled from the UI by adding them to CANCELABLE_STATUSES
for the job. #505365