Skip to content

Filter duplicated downstreams in mini pipeline graph for commit box

Mireya Andres requested to merge update-graphql-mini-pipeline-graphs into master

What does this MR do and why?

For #367547 (closed)

Retrying a trigger job will create a new downstream pipeline. Which means the pipeline graphs can show multiple outdated downstream pipelines.

This MR removes the duplicate circles in the mini pipeline graph of the commit page. This should be the last update for the GraphQL instances of the mini pipeline graph that have not been updated yet (the other instance that uses GraphQL is the one in the pipeline editor, which has been updated in this MR: !110352 (merged)). Updates for the instances that use REST/Rails injection will be done in another MR.

Since the retry trigger job feature is not yet available, this should not affect how we render existing pipeline graphs today.

Screenshots or screen recordings

Before After
before after

How to set up and validate locally

  1. Enable the ci_recreate_downstream_pipeline feature flag.

  2. Add the following to your .gitlab-ci.yml file.

    bridge_job:
      trigger:
        include: child-pipeline.yml

    child-pipeline.yml can have any simple script.

  3. Go to the pipeline graph for the pipeline triggered after saving the content. bridge_job should have a retry button.

  4. Click on the retry button to retry the trigger job. You can retry multiple times.

  5. Go to the commit page for the change you just made. The mini pipeline graph should only show the latest downstream pipeline (only shows one circle for the downstream pipelines no matter how many times we've retried the trigger job).

MR acceptance checklist

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

Edited by Mireya Andres

Merge request reports