Skip to content

ci: pilot capacity-aware first Coverage runner placement - #499

Merged
Ariznawlll merged 6 commits into
mainfrom
codex/coverage-first-pool-pilot
Nov 28, 2026
Merged

Ariznawlll merged 6 commits into
mainfrom
codex/coverage-first-pool-pilot

Conversation

@Ariznawlll

Copy link
Copy Markdown
Collaborator

Scope

Try capacity-aware first placement only on one isolated MatrixOne #32922 push attempt. This PR changes no workflow configuration, RBAC, runner pools, or production callers. No kubeconfig or credentials are passed to Actions.

The authorized isolation workflow supplies a fresh allowlisted receipt of whole CPU/memory/local work-PVC slots and pending demand. First reservations target exact runner scale-set names on MNL2/RUH, using distinct pools when available. Empty, stale, or invalid data falls back to the existing shared queue. This is a single-parent pilot, not a scheduler or reservation across PRs.

Only the first reservation changes. A placed group is not moved, and the existing hour-long Shanghai fallback and identity/grant checks remain in force.

Validation

109 local CI tests passed. New regressions cover stale/invalid receipts, pending demand, distinct pools, isolation scope, wrong runner identity, and the existing 3600-second Shanghai boundary. Live evidence is reported separately after the one authorized isolated run.

@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH XP,麻烦帮忙 review 一下这个 PR 的最新提交 8d871ad,重点看发送预约前的快照过期校验和共享队列回退。

已用 MatrixOne #32922(02db9ac)在隔离分支实跑一次,未重跑。父工作流、GROUP0、GROUP1 和最终覆盖率合并都通过。两个 worker 日志均确认加载 8d871ad;从合并产物复算,语句覆盖率为 84.67%(608366/718522)。

这次保留了已过期的容量快照:两组实际请求的都是共享标签 cs-node-cache-7c14g,最终分配到 JED 的两个不同 runner,没有固定到快照中的节点。规划时 179 秒、发请求时 183 秒的临界情况由回归测试覆盖;本轮实跑不作为新鲜快照跨节点分配的证据。

@XuPeng-SH
XuPeng-SH marked this pull request as ready for review November 27, 2026 17:25

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 指定伸缩组无人接单时及时回到 CS 共享队列

发请求前复查快照过期是合理的。快照通过复查后,派单只匹配一个伸缩组,此时 select_cs 会禁用中途切换。如果该组随后没有空位,任务只能等满 3,600 秒才走上海 IDC。我在这个 head 上用受控时间线复现了该路径。共享队列在第 30 秒已有 runner 能接单,指定伸缩组的任务一直排队到上海兜底。 调度代码

请把精确派单做成短探测。短时间仍无人接单时,复用现有的撤销确认,再派回共享队列,并从首次排队开始累计上海兜底的等待时间。回归测试请覆盖指定组排队但共享有空位,以及切换时旧任务已拿到 runner 的情况。

现有实跑已经验证过期快照会回到共享队列。请补一次新鲜快照的实跑,记录两组实际分配到的伸缩组,以及从首次派单到分配的时间。 现有实跑

@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH 麻烦复审一下 #499。最新提交 18251dd 已同步 main、解决冲突,GitHub 检查已通过。此前 #32922 隔离试跑 首次直派到 MNL2 和 RUH,两组 Coverage UT 均通过,覆盖率也成功合并。这个 PR 只验证隔离试跑,不开启正式流量直派。

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审 18251dd。上一轮指出的一小时精确派单等待已修复。现在短探测复用原有撤销确认,确认后才派回共享队列,上海兜底仍从首次排队计时。

[P2] 试跑入口需要回收已派出、尚未授权的 worker。 我用撤销 API 返回 503 复现了选择器失败后已有 reservation.json、child 输出为空的情况。隔离工作流此时跳过清理,子任务可能继续排队。现有 revoke 能在 child 为空时按预约凭据识别并回收对应 worker。请把试跑清理条件对齐主流程,补一条派单成功后选择器失败或被取消的回归。 隔离工作流 · 主流程清理

快照时间戳的边界问题见行内评论。当前提交的 GitHub 检查通过,相关套件 134 项,本地调度测试 97 项通过。最新隔离跑的 MNL2、RUH 两组和覆盖率合并也已通过,使用的脚本版本是 9166306。请在最终提交上复验选择器失败后的回收。 GitHub 检查 · 隔离跑

Comment thread scripts/coverage_standby.py Resolved
Review: PRR_kwDOLFVZDs8AAAABa10nuw. Cover receipt-based cleanup after a failed exact-pool probe with no child output. The MatrixOne trial caller cleanup condition is a separate change.
@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH XP,补上你要求的新鲜容量快照实跑证据,请复审 #499。两轮串行、每轮独立采样;MatrixOne #32922 固定 365f747,调度代码固定 9166306。四个分组 UT、两次覆盖率合并均通过,无重跑。

轮次 分组 快照选出的目标伸缩组(与实际请求标签一致) 实际节点(Pod 的 spec.nodeName) 首次派单时快照年龄 首次派单 → job 开始
1 GROUP0 cs-mnl2-nc-n1-pr-v1 MNL2 / mo-standard-1 65 秒 16 秒
1 GROUP1 cs-ruh-nc-n0-pr-v1 RUH / mo-standard-0 64 秒 17 秒
2 GROUP0 cs-mnl2-nc-n0-pr-v1 MNL2 / mo-standard-0 61 秒 14 秒
2 GROUP1 cs-ruh-nc-n0-pr-v1 RUH / mo-standard-0 59 秒 15 秒

等待时间用同一父工作流下该组首个子 run 的 created_at 到实际接单 job 的 started_at 计算,不含 UT 执行。第一轮 MNL2 node0 有 1 个可用名额、node1 有 2 个;第二轮重新采样时 node0 恢复到 2 个,因此 GROUP0 的目标从 node1 变为 node0。四次都是目标池直接接单,未触发 30 秒回退或上海兜底。

验证边界:这两轮不是最新 head 9354c91 的端到端验收。第二轮隔离入口已对齐失败/取消时的 worker 清理条件,并本地验证了有预约凭据、无 child 输出时的回收;成功的实跑没有注入撤销 API 失败。请结合最新提交及其 CI 检查 复审。

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审 9354c91,两条待改意见均已验证。

  • 第二轮隔离入口已对齐主流程的清理条件。最新提交的回归注入撤销 API 503,验证选择器留下预约凭据、没有输出 child 时,现有 revoke 仍能回收对应 worker,且只派单一次。 隔离入口 · 回归
  • 快照改为直接比较时间范围,正负超大时间戳都回到共享队列。复核了 180 秒有效期、短探测切换、已分配 worker 优先和上海兜底的原始计时。 快照校验

当前提交 GitHub 检查通过,相关套件 135 项,本地调度回归 98 项通过。两轮实跑使用 9166306,四组 UT 和两次覆盖率合并均通过。当前提交的异常回收由故障注入回归验证。 当前 CI · 两轮实跑记录

@Ariznawlll
Ariznawlll merged commit 1f3fcaf into main Nov 28, 2026
1 check passed
@Ariznawlll
Ariznawlll deleted the codex/coverage-first-pool-pilot branch November 28, 2026 08:43
mergify Bot pushed a commit to matrixorigin/matrixone that referenced this pull request Nov 28, 2026
## What type of PR is this?
- [x] Test and CI

## What this PR does / why we need it
Pin the Coverage standby entrypoint, CS worker, Shanghai IDC worker and cross-repository contract checkout to matrixorigin/CI#499 merge SHA `1f3fcaf713bd56722031a72068469fd2f5ba417b`.

This is a pin-only update. Capacity-aware initial placement remains restricted to the isolated #32922 trial. Production routing, the existing site-retry opt-in, and the one-hour Shanghai fallback are unchanged. Align the standby pin in #33420 separately if it lands after this PR.

## Validation
- actionlint workflow validation; 10 MatrixOne identity and pinned cross-repository retry/cleanup tests; 144 CI Coverage tests on the exact merge SHA.
- [Prior #32922 isolated trial](https://github.com/matrixorigin/matrixone/actions/runs/46022114633): both groups passed and coverage merged. No manual rerun was triggered.
- An additional broad local test run hit a missing local Go installation in the unrelated static-analysis suite.

Approved-by: XuPeng-SH <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants