ci: 合入 main 只跑对应的成员,全量退到每周 - #191
Merged
Merged
Conversation
每次合并都在重跑全部 67 个成员 × 三平台 —— 约 11 小时 runner 时间,用来复核 几分钟前那个 PR 已经绿过的同一批东西。 原因是 select 的第一行 `event != pull_request -> full`。它的前提是"push 没有 可 diff 的 base",而这个前提不成立:本仓的合并都是 squash,`github.event.before` 就是上一个 main,`before..HEAD` 复现出来的文件列表和 PR 当时看到的一模一样。 拿 698b95e 实测,两边都选出 `redis-plus-plus redis-plus-plus-v133`,十个改动 文件逐个对得上。 ## 事件分派 pull_request 三点 diff(自己的提交对 merge base) push 两点 diff(这条分支上真正落下的东西) 其他 全量 schedule 和 workflow_dispatch 保持全量:它们表达的不是"有改动落地",而是 "把所有东西查一遍",那正是下面那张网的意义。 push 的两个兜底都倒向全量:before 是全零(建分支)或那个对象不在历史里 (force-push 把它丢了)时,没有可 diff 的东西,重跑好过猜。 ## 定时从每天改成每周 选择性测试结构上看不到的只有一件事:两个改动各自绿、落在一起互相踩 —— 两个 PR 的 diff 都没提到那个坏掉的成员,所以两个都选不中它。全量是这件事的网。 这张网每天撒一次和每七天撒一次,抓到的是同一批交互;而全量已经不便宜了(加 了第二条 linux 工具链腿之后约 11 小时)。改成周日 06:00 UTC。手动触发本来就 在,想立刻验一遍不用等。 五条路径都验过:schedule / dispatch / before 全零 / before 不在历史 → 全量; before 正常 → 选择性。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
你问的那个:698b95ee 没改 CI 文件却跑了全量。原因不是文件,是事件类型 —— select 的第一行:
日志原话
full run: event=push,底下那套文件分类规则根本没走到。前提不成立
这一刀切的理由是"push 没有可 diff 的 base"。实测不是这样:
github.event.before就是上一个 mainbefore..HEAD复现出的文件列表,和 PR 当时看到的一模一样拿 698b95e 复跑新逻辑:
而 #188 的 PR 运行当时选的正是
redis-plus-plus redis-plus-plus-v133。改动
pull_requestpushschedule/workflow_dispatchschedule和workflow_dispatch保持全量是有意的:它们表达的不是"有改动落地",而是"把所有东西查一遍"。push 的两个兜底都倒向全量 ——
before全零(建分支)或那个对象不在历史里(force-push 丢了)时,没有可 diff 的东西,重跑好过猜。五条路径都验过:
定时:每天 → 每周
选择性测试结构上看不到的只有一件事:两个改动各自绿、落在一起互相踩 —— 两个 PR 的 diff 都没提到那个坏掉的成员,所以两个都选不中它。全量是这件事的网,现在它是唯一的网了,所以不能撤。
但这张网每天撒一次和每七天撒一次,抓到的是同一批交互;而全量已经不便宜:加了第二条 linux 工具链腿之后约 11 小时 runner 时间。改成周日 06:00 UTC。
手动触发本来就有(
workflow_dispatch),想立刻验一遍不用等到周日。省下多少
以 698b95e 为例:11 小时 → 两个新成员。日常合并基本回到分钟级,代价是跨 PR 交互最长延后 7 天暴露。
与 #189 的关系
两个 PR 都改
validate.yml,但落在不同的 hunk(#189 在 case 列表内部、shards_for和 timings job;这里在on:触发器和base=那几行)。合并顺序无所谓。