Skip to content

delivery-metrics: fetch all the pipelines and filter by source, ref, and status

Alessio Caiazza requested to merge fix-pipelines-metric into master

What does this MR do and why?

To mitigate gitlab#348465 (closed) we implemented a workaround based on child pipelines !1885 (merged)

This had an unexpected side effect on our delivery_deployment_pipelines_total metric which now is completely broken.

We are counting pending deployments by scrolling through all the pipelines with scope: tags until we find the first with status success.

The introduction of the workaround broke this because now tags are stolen by the most recent child pipeline on that ref, hiding the deployment pipeline.

With this change we are now fetching all the pipelines in the project, filtering out those that are not coordinated pipelines. We stop our search at the first successful coordinated pipeline.

Closes: gitlab-com/gl-infra/delivery#2444 (closed)

Author Check-list

  • Has documentation been updated?
Edited by Alessio Caiazza

Merge request reports

Loading