Ci::AbortPipelinesService should fail jobs
Problem
Ci::AbortPipelinesService
currently updates the status of pipelines/stages/jobs to canceled
in bulk.
There is a fundamental difference between using canceled
and failed + failure_reason
. In case where jobs are dropped by the system we need to use failed
and communicate the reason to the user through a failure_reason
.
Solution
- introduce 2 new failure reasons
:user_blocked
and:project_deleted
for the 2 cases where the service object is called - Change
Ci::AbortPipelinesService
to take in input the failure reason and update the statuses tofailed + failure_reason