Add merge queue CI optimisation
- 主要語言
- Go
- 星號
- 1.5k
- 分支
- 70
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 7
描述
## The problem
We use stacks a lot, and often mid stack PRs have some CI failures that are fixed above.
When I merge a stack of 5 PRs, I don't need to run CI in each of them, it's OK to skip 1-4 and only run CI in 5th. It saves A LOT of wasted runner minutes.
## Current state
You have this checkbox "Only merge non-failing pull requests":
**Imagine we have added 5 stacked PRs to a merge queue, with CI like this**
PR 1 pass ✅
PR 2 pass ✅
PR 3 fail ❌
PR 4 pass ✅
PR 5 fail ❌
Checkbox set:
It will run CI on 5 pull requests, **merge 1-2**
Checkbox not set:
It will run CI on 5 pull requests, **merge 1-4**
## Proposal
It is greedy to _merge something_ now. I want it to _merge a queued atomic stack_ instead.
In order to make it work, you need another checkbox "merge a queued stack atomically and only run CI on the last PR", where it will only run CI on PR 5, and it **will not merge** 1-2 or 1-4 of I queued 1-5.
However, if I only added 1-2 or 1-4 to the merge queue - it will merge, because the last **queued** PR succeeded.
**For context:** it is not rare for us to hit a 50 PRs limit in a graphite, and 20 PRs stacks are very usual. Saving 20x runner minutes is a huge deal.
貢獻指南
研究方向
沒有指定檔案或測試。先定位 merge queue 的實作以及現有的 “Only merge non-failing pull requests” 選項,然後追蹤堆疊 PR 的評估方式。完成的標準是:佇列中的 stack 只能在其最後一個 PR 上執行 CI,並以原子方式合併;同時,部分 queue 仍會在其最後一個排入佇列的 PR 成功時合併。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- github, go
- 領域
- cli, devtools
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100