Skip to content

ci: select the first CS pool by verified capacity for Coverage UT - #504

Merged
XuPeng-SH merged 7 commits into
mainfrom
codex/coverage-pr32922-live-capacity
Nov 28, 2026
Merged

XuPeng-SH merged 7 commits into
mainfrom
codex/coverage-pr32922-live-capacity

Conversation

@Ariznawlll

@Ariznawlll Ariznawlll commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Capacity-aware first placement is default-off for PRs already authorized for CS Coverage UT against main or 4.2-dev. The protected entrypoint may opt in on the initial attempt. Each group needs the existing exact parent grant and live PR authorization before running tests.

First placement and fallback

  • Both groups share one 15-second capacity snapshot. CPU, memory and whole DirectPV work slots are checked against the desired replicas of the owned ARC EphemeralRunnerSet. Bound runner pods count toward that target. This uses the same ARC API on 0.14 and 0.15. Upstream ARC status change Cordoned and terminating DirectPV drives contribute zero work slots even when their status is Ready.
  • Dispatch verifies the child run and ticket. The 30-second placement budget covers missing jobs and pre-queue states. When GitHub starts reporting an assignment, up to ten more seconds are available for the runner fields to settle. A verified assignment wins at handoff.
  • Missing placement data and incomplete assignments use the same fallback after the exact child is confirmed terminal. Failed cancellation responses trigger a bounded read of that child. Shanghai eligibility uses the first observed CS queue wait.

Validation and rollout

Passed 169 related tests on Linux and workflow actionlint. Fault injection through the selector on both bases showed that incomplete runner fields now fall back at 40 seconds on the simulated clock, with one grant to the replacement. If the fields settle at handoff, the original worker gets the grant. Missing placement records and transient reads also fall back, and a mismatched child attempt receives no grant or cancellation request. The ARC 0.14/0.15, missing job and cancellation HTTP 503 cases were rechecked.

A/B replay on both bases covered cordoned and terminating drives. A healthy peer received the first dispatch when offered. With no usable offer, the selector dispatched directly to shared CS. Both paths wrote one grant and avoided the extra cancellation.

Activation requires an approved read-only source and verification of S3 health, live runner assignment and fallback at configured sites. MatrixOne #33436

@Ariznawlll
Ariznawlll marked this pull request as ready for review November 28, 2026 14:00
@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH 麻烦帮忙复审一下 #504。已同步 CI main(d94028c),保留 #503、#505 的 S3 Coverage 改动。当前提交 354f9ad 的 PR 检查 已通过。派发前选池仍只面向 #32922、默认关闭,未开启正式直派。

@Ariznawlll
Ariznawlll requested a review from XuPeng-SH November 28, 2026 14:38
@Ariznawlll Ariznawlll changed the title ci: read CS capacity before first dispatch for PR 32922 ci: select the first CS pool by verified capacity for Coverage UT Nov 28, 2026
@XuPeng-SH
XuPeng-SH merged commit 7020694 into main Nov 28, 2026
1 check passed
@XuPeng-SH
XuPeng-SH deleted the codex/coverage-pr32922-live-capacity branch November 28, 2026 19:44
XuPeng-SH added a commit to matrixorigin/matrixone that referenced this pull request Nov 28, 2026
…33436)

## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Related to #33416 as a follow-up to the shared Coverage routing work.

## What this PR does / why we need it:

Wire the protected default-branch Coverage entrypoint for PRs targeting
`main` and `4.2-dev`, including authorized draft PRs. Capacity-aware
first placement is default-off. It uses an ARC capacity hint, keeps a
verified runner assignment and confirms the original child is terminal
before any replacement.

The dispatcher, both workers and the contract checkout pin the published
CI `main` commit `70206949f96aaf1fe76cc2c5e88bbd9450fa9bf0`. Its tree
matches the reviewed companion commit and the four pins pass the local
cross-repository contract. Production activation requires the repository
setting and an approved read-only source. [CI
#504](matrixorigin/CI#504)

Validated against `main` at `c4b054874b8e`. Actionlint, 86 CI scope
tests and two cross-repository contract tests passed locally. The
companion passed 169 Linux tests and selector fault injection for both
bases, including exclusion of cordoned and terminating DirectPV drives,
late runner metadata and terminal confirmation. Live capacity-aware
placement and fallback await validation with the production capacity
source.

---------

Co-authored-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