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
- Turn on
ci_recreate_downstream_pipeline
FF through rails console. - Setup your GDK to have working runners https://docs.gitlab.com/runner/configuration/macos_setup.html
- 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 isroot
, 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'
- Run a pipeline in the main project and wait for it to finish
- Notice that the trigger job can be retried
- Click on the retry button
- Notice that a modal appears with clear explanations
- Cancel
- Notice the modal closes
- Notice the job has not been retried
- Click on retry button again
- Notice the modal opens
- Click on Do not ask again
- Confirm the modal
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #388153 (closed)
Edited by Frédéric Caplette