Update JobID for RetryJob mutation in GraphQL
What does this MR do and why?
A few milestones ago the ability to retry a bridge/trigger job through the UI was implemented. This MR updates the mutation to retry a pipeline so that the JobID
can be a Ci::Processable
, which is the parent of Ci::Bridge
and Ci::Build
.
How to set up and validate locally
In a project with a trigger job/bridge, run the following mutation in GraphQL:
mutation {
jobRetry(input: {id: "gid://gitlab/Ci::Bridge/971"}) {
job {
id
status
}
errors
}
}
Previously, the following error would occur: "message": "gid://gitlab/Ci::Bridge/971" does not represent an instance of Ci::Build"
, since the JobID
referenced in Mutations::Ci::Job::Base
would be referring to Ci::Build
.
Now if the mutation is run, the retry succeeds as expected - PENDING
status is expected:
{
"data": {
"jobRetry": {
"job": {
"id": "gid://gitlab/Ci::Bridge/1010",
"status": "PENDING"
},
"errors": []
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.