Add missing GraphQL data for pipeline detail header
What does this MR do and why?
This MR aims to add the data provided by Rails and the Rest API to the GraphQL API in order to ensure that there is one single source of truth for the Frontend.
In this MR the following changes have been made:
- Introduce PipelineFlagsType to group pipeline's flag data in a specific field
- Introduce an EE module for the PipelineFlagsType which contains an EE-specific field
- Introduce a new method in the PipelineSerializer to only fetch the fields under the flags attribute
- Introduce PipelineFlagsResolver in order to define where the flag data will be fetched from by the PipelineFlagsType
- Add new fields to the PipelineType
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Start up Gitlab locally
- Find a Pipeline that you want to query from the Rails console and get its'
iid
as well as the project'sfull_path
- Open GraphiQL explorer and query the pipeline's newly added fields
Example query:
{
project(fullPath: "toolbox/gitlab-smoke-tests") {
id
pipeline(iid: 1) {
# new fields
name
totalJobs
triggeredByPath
child
latest
failed
refText
source
computeMinutes
flags {
cancelable
failureReason
retryable
stuck
yamlErrors
latest
}
mergeRequest {
sourceBranch
targetBranch
}
}
}
}
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 #411452 (closed)
Edited by Panos Kanellidis