Skip to content

Add confirmation modal for job trigger retry

What does this MR do and why?

This is behind a FF ci_recreate_downstream_pipeline. When the flag is turned on, a retry button appears on trigger jobs that allows them to be retried: this is not done in this MR. This MR adds a confirmation modal when clicking on the retry so that a user can confirm that they understand the implication of the action, which is that we are not simply re-creating failed jobs to run again, but instead we are creating a new pipeline entirely. There is also a "Do not show again" option which we save in local storage on a per user basis.

Screenshots or screen recordings

Before After
Screen_Recording_2023-01-17_at_4.19.17_PM Screen_Recording_2023-01-17_at_4.13.22_PM

How to set up and validate locally

  1. Turn on ci_recreate_downstream_pipeline FF through rails console.
  2. Setup your GDK to have working runners https://docs.gitlab.com/runner/configuration/macos_setup.html
  3. Write a CI/CD configuration with at least one downstream pipeline. Given that you have another repository (let's call it my-other-project) and that your username is root, something like this will work (Also make sure that the other project also has a functioning runner.):
trigger_job1:
  stage: build
  trigger: 'root/my-other-project'
  1. Run a pipeline in the main project and wait for it to finish
  2. Notice that the trigger job can be retried
  3. Click on the retry button
  4. Notice that a modal appears with clear explanations
  5. Cancel
  6. Notice the modal closes
  7. Notice the job has not been retried
  8. Click on retry button again
  9. Notice the modal opens
  10. Click on Do not ask again
  11. Confirm the modal
  12. Notice the trigger job runs again

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #388153 (closed)

Edited by Frédéric Caplette

Merge request reports