Add source freshness hints and constraints to "Pipelines must succeed"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Release notes
Problem to solve
Some projects cannot use merge trains (e.g. gitlab-org/gitlab
at the time of writing), but instead opt for "Pipelines must succeed" with "Merged result pipelines" (or even without merged results). This comes with a risk of merging changes that were tested on outdated code and will break the target branch, and the risk increases the older the "target branch representative" in the latest pipeline is.
Proposal
Allow users to configure "freshness thresholds" for the "Pipeline must succeed" setting. The threshold should be based on the number of commits the latest pipeline SHA is behind target branch. That way, it should work uniformly for merged result pipelines and pipelines that run against the source branch. I can imagine there being two useful thresholds:
-
Warning: At this threshold, display a prominent warning near the merge action, but do not block the merge. We would use this for
gitlab-org/gitlab
to remove cognitive load on maintainers, without being overly strict (because our pipelines can be flaky). - Error: At this threshold, a merge is no longer allowed at all.
This setting, or an analogous one, could also be used for merge trains to decide when an immediate merge is allowed.
Intended users
Feature Usage Metrics
Does this feature require an audit event?
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.