Skip to content

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:

  1. 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.
  2. Actions on running pipeline to retry and cancel should work
  3. Pipelines count badge does not update when new pipelines are fetched. This will be implemented in: #467550 (closed)
  4. Manual actions dropdown does not render. This will be implemented in: #467551
  5. no mini graph as this will be implemented in: #419725
  6. 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
Screenshot_2024-06-14_at_12.57.17_PM Screenshot_2024-06-14_at_12.52.20_PM

Screen_Recording_2024-06-14_at_12.51.25_PM

How to set up and validate locally

  1. Make sure you have runners set up
  2. Enable the feature flag mr_pipelines_graphql
  3. Create a merge request
  4. Go to the MR page
  5. Go to the pipelines tab
  6. Use the "Run pipeline" button
  7. Notice the button goes into the loading state
  8. Notice when loaded, you see a message to confirm the pipeline has been created
  9. Wait for some time
  10. Notice the new pipeline appears in the list
  11. If the pipeline is running, click to cancel
  12. Notice that it cancels the pipeline
  13. When the pipeline is cancelled, click to retry the pipeline
  14. Notice the pipeline is restarted

Related to #466725 (closed)

Edited by Frédéric Caplette

Merge request reports

Loading