Optimized pipeline queue handling
Description
Now we have next pipeline queue handling pattern: pipelines are handling in order of its creation.
Some features of this pattern:
- We handle any commit and in result will have pipelines for all commits, what simplify search of possible buggish one
- We can handle unnecessary, redundant pipelines
With #8998 (closed) we got one more pattern: handle only HEAD commits in order of its creation.
Some features of this pattern:
- We handle only actual pipelines on branch, excluding unnecessary, redundant pipelines (non-HEAD)
- Search of first buggish commit can be difficult, because of auto-cancelation
I think that someone could be interested in next pattern: at first we handle HEAD pipelines and then, in reversed order, others.
Some possible features of this pattern:
- At first we handle actual (HEAD) pipelines on branch, then others
- We handle any commit and in result will have pipelines for all commits, what simplify search of possible buggish one
I think it can be interested for teams, which have CI runners on metal servers / monthly paid VDS (not systems pay-as-you-go). Such teams usually have hot time (about 8 - 10 hours per day), when efficiency should be maximal (at first we should take HEAD pipelines, then others) and idle time, when we can handle low priority pipelines
Proposal
Well, I propose to realize some sort of reversed order queue for pipelines:
- HEAD at first, then others
- non-HEAD pipelines are handled in reverse order (from HEAD to first one pipeline)
And in project CI/CD settings we can have some sort of such setting:
- Optimize pipeline queue (selector)
- Disabled
- Reversed order pipeline queue
- Auto-cancel pending, redundant pipelines
Links / references
Documentation blurb
(Write the start of the documentation of this feature here, include:
- Why should someone use it; what's the underlying problem.
- What is the solution.
- How does someone use this
During implementation, this can then be copied and used as a starter for the documentation.)