Create Backend Services for Cancel and Unschedule job actions
Proposal
Currently, the cancel
and unschedule
actions rely on controller code to perform the related tasks, using this pattern would make the creation of the mutations for these actions in the GraphQL API easier
The play
and retry
actions do have actions in the following files
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/ci/retry_build_service.rb
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/ci/play_build_service.rb
We can add two new services:
-
app/services/ci/cancel_build_service.rb
orapp/services/ci/build/cancel_service.rb
-
app/services/ci/unschedule_build_service.rb
orapp/services/ci/build/unschedule_service.rb
based on the existing controller actions:
and then complete the mutation in another issue.
Edited by Allison Browne