Frontend: Implement retry on trigger job
Release notes
In this release users will be able to retry and spin up a new downstream pipeline from the trigger job
Summary
With the spike #355508 (closed) done, we can now implement the actual retry action on the graph. This issue encompass FE and BE given how interconnected the feature is between both areas of the code.
What this should deliver is:
- A retry button appears on trigger job that can be retried
- Clicking on the retry prompts a modal to warn users that retry a trigger job will spawn a new pipeline
- Confirming the modal retries the trigger job
- cancelling take the user back to the graph
- Once the new pipeline has spawned, the old one is removed from the graph and the mini-graph where applicable (the pipeline that was run from the initial trigger job)
Implementation Plan
This feature will be available with the ci_recreate_downstream_pipeline
feature flag.
To avoid getting issues in the UI when we toggle the feature flag (for example, when the flag is disabled after we retried a few trigger jobs), the feature flag will only affect the retry button (+ confirmation modal). The pipeline graphs should be able to display the latest downstream pipeline regardless of the feature flag status.
Affected by the feature flag:
-
Retry button shows up on the main pipeline graph. Clicking on the retry button will prompt a confirmation modal. (!108698 (merged)) -
Toast notification will show up after retrying a trigger job. !112829 (merged) -
Confirming the modal retries the trigger job, which will spawn a new downstream pipeline. (!109021 (merged)) -
Documentation (!112140 (merged))
Regardless of feature flag status:
The main and mini pipeline graph should only show the latest downstream pipelines.
These are the pages with the mini pipeline graph (taken from this audit). They will be updated individually to use the filter only the latest downstream pipelines:
-
Pipeline Editor (!110352 (merged)) -
Commit Detail Page (!110873 (merged)) -
Pipelines Table (!111014 (merged)) -
MR page (MR widget + MR Pipelines table) (!111014 (merged))
Duplicate circles should also be removed for:
-
(Main) Pipeline Graph (!110670 (merged))
Previous work done for this feature, for reference:
Iteration | Description | Link |
---|---|---|
1 | DESIGN/DISCUSSION | https://gitlab.com/gitlab-org/ci-cd/pipeline-authoring/-/issues/53 |
2 | Frontend: Add a retry button to a downstream pipeline on the pipeline graph | #354974 (closed) |
3 | Backend: Differentiate trigger jobs from regular jobs in the UI | #355751 (closed) |
4 | Design: Differentiate trigger jobs in the UI | #340194 (closed) |
5 | Frontend: Differentiate trigger jobs from regular jobs in the pipeline graph | #356330 (closed) |
6 | Frontend: Differentiate trigger jobs from regular jobs in the mini pipeline | #356331 |
7 | Technical spike - expose unexpected behavior when recreating a downstream pipeline | #355508 (closed) |
8 | Backend issue to recreate downstream pipeline | #368920 (closed) |
9 | Implement retry on trigger job |
|