GraphQL: Create `project` property in `CiJob` type
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR adds the field projects
to the CiJob
type. This prevents the unnecessary of the pipeline
object (since previously projects were access through job.pipeline.project
).
Screenshots or screen recordings
The Graphql Explorer shows the new field project
on the CiJob
type:
How to set up and validate locally
- Use rake task to setup runners
bin/rake gitlab:seed:runner_fleet
- Navigate to the CI/CD jobs page
http://gdk.test:3000/admin/jobs
- Visit any runner from the jobs list by clicking on the runner name in the
Runner
column - Click the
Jobs
tab. You should be on a page with an address similar to:http://gdk.test:3000/admin/runners/41#/jobs
- Click on a project link in the table. You should be taken to the project page.
- Alternatively, visit http://gdk.test:3000/-/graphql-explorer and run this query:
query getRunnerJobs($id: CiRunnerID!) {
runner(id: $id) {
id
projectCount
jobs {
nodes {
id
detailedStatus {
id
detailsPath
group
icon
text
__typename
}
project {
id
name
webUrl
__typename
}
shortSha
commitPath
finishedAt
duration
queuedDuration
tags
__typename
}
__typename
}
}
}
Variables
{
"id": "gid://gitlab/Ci::Runner/4"
}
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.
related to: #385851 (closed)
Edited by Tymm Schmitke