Skip to content

Add PipelineTierLabel processor

David Dieulivol requested to merge 1516-add_pipeline_tiers_labels into master

Context

Closes #1516 (closed)

What's in this MR?

Documentation of the processor:

        Ensures that a ~"pipeline:tier-X" label is set (X is a number between 1 and 3) with the following rules:
         - if the MR has no approvals => ~"pipeline:tier-1"
         - if the MR has at at least one approval, but still requires more approvals => ~"pipeline:tier-2"
         - if the MR has all the approvals it needs => ~"pipeline:tier-3"

Why do we do this?

This MR, coupled with gitlab-org/gitlab#459974, will give us a new, very interesting metric on merge requests:

Which pipeline tiers would be run on merge requests?

Once we have this information, we'll be able to do a dashboard similar to this one, but with pipeline tiers (which are based on the lifecycle of an MR, specifically on its approvals for now) instead of pipeline types (which are based on the kind of jobs being run in a pipeline).

The end goal will be to decide in which tiers we'll put which jobs, and also if we need additional tiers (we have created ~pipeline::tier-4 already, as I suspect we'll need it).

Expected impact & dry-runs

Very small impact: worst-case scenario, it adds those labels randomly.

There are no CI/CD rules configured on those labels, so adding them should have no impact on MRs.

Merge request reports