Apollo MR pipelines - Implement run, retry and cancel buttons
What does this MR do and why?
This is behind a disabled FF mr_pipelines_graphql
.
As part of our effort to migrate the Merge request page pipelines tab to GraphQL, we are now adding the run pipeline button functionality and all specs related to it. WE are removing the eventHub that took care of that action and instead execute the API call directly within the wrapper. In time, this REST action will be migrated to a graphql mutation](#420645).
We are also showing and implementing the logic for pipelines actions (retrying, cancelling, and refreshing).
In this state:
- Run pipeline button will appear and work when clicked. It should get to the loading state and show a message when the pipeline is being created. More importantly, you should see a new pipeline appear after some time.
- Actions on running pipeline to retry and cancel should work
- Pipelines count badge does not update when new pipelines are fetched. This will be implemented in: #467550 (closed)
- Manual actions dropdown does not render. This will be implemented in: #467551
- no mini graph as this will be implemented in: #419725
- No pagination as this will be implemented in: #423282
For more details, you can check the epic: &11080
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
Screen_Recording_2024-06-14_at_12.51.25_PM
How to set up and validate locally
- Make sure you have runners set up
- Enable the feature flag
mr_pipelines_graphql
- Create a merge request
- Go to the MR page
- Go to the pipelines tab
- Use the "Run pipeline" button
- Notice the button goes into the loading state
- Notice when loaded, you see a message to confirm the pipeline has been created
- Wait for some time
- Notice the new pipeline appears in the list
- If the pipeline is running, click to cancel
- Notice that it cancels the pipeline
- When the pipeline is cancelled, click to retry the pipeline
- Notice the pipeline is restarted
Related to #466725 (closed)