Skip to content

ci/bin: Fix dependency jobs graph generation to consider early stage jobs

Guilherme Gallo requested to merge gallo/mesa:crnm-fix-early-stages-deps into main

What does this MR do and why?

Fixes two problems related to MR pipelines

Use of sha instead of iid in graphql

We were using sha to fetch the pipeline from GraphQL, but that leads to wrong results when MR and branch pipelines exist. For example, using pipeline-url as the MR pipeline:

This would lead into the branch pipeline:

Fixes dependency jobs graph generation to consider early stage jobs

In Mesa MR pipelines, we have the sanity job. This job is not an explicit need for any one job, because only jobs with - needs: [] ignores previous jobs. If no needs is specified, the job will wait until all the jobs of earlier stages are finished before starting.

See additional details section at: https://docs.gitlab.com/ee/ci/yaml/index.html#stage-post

Extras

  • Simplify GraphQL pipeline details query
  • Document affected part of the code

Closes: #10032 (closed)

Edited by Guilherme Gallo

Merge request reports