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

We can add two new services:

  • app/services/ci/cancel_build_service.rb or app/services/ci/build/cancel_service.rb
  • app/services/ci/unschedule_build_service.rb or app/services/ci/build/unschedule_service.rb

based on the existing controller actions:

and then complete the mutation in another issue.

Edited by Allison Browne