Skip to content

fix(ci): recover Coverage workers from transient status reads - #498

Merged
XuPeng-SH merged 5 commits into
mainfrom
codex/coverage-robust-wait
Nov 27, 2026
Merged

XuPeng-SH merged 5 commits into
mainfrom
codex/coverage-robust-wait

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Coverage can lose a valid queued reservation or cancel a running worker after one transient GitHub metadata read. The selector's result wait treated a failed poll like a failed worker. This affects Coverage on both MatrixOne main and 4.2-dev.

Retry transient reads for the same run and use its original attempt for the terminal result. Bound the retry with backoff, honor rate limits within that budget, and fail closed on permission or identity errors. Carry one selection deadline through CS negotiation, handoff and dispatch. The dispatcher checks it after the final parent validation and immediately before the POST. The selector records the returned run ID locally so its existing two-minute cleanup step can verify and revoke a reservation even if the dispatch response overtakes the deadline. The reservation never authorizes PR code. Retry temporary worker-ref reads within the same selection deadline. Replacements require a confirmed cancellation, and the shared CS queue, 60-minute Shanghai threshold, and worker execution limits stay in use.

All 124 selected CI tests passed on Linux. The regressions cover transient metadata in dispatch, CS queueing, handoff, cancellation confirmation and worker result polling. The Shanghai regression covers a transient ref 503 after confirmed CS cancellation and an accepted dispatch with a late receipt. It checks that the ref retry dispatches once and that the late receipt triggers exact-identity cancellation without a grant or another dispatch. The slow ref regression still verifies zero dispatches after the deadline. The pinned MatrixOne contract exercises a transient result 503 followed by the genuine failed group and one replacement dispatch.

This branch is based on #497 so matrixorigin/matrixone#33399 can test the combined revision. Merge #497 first, then rebase the waiting changes on CI main if the squash changes the SHA. Waiting changes

@Ariznawlll

Copy link
Copy Markdown
Collaborator

复审了 7b8c594。短暂读失败后继续跟踪原 worker 的方向没问题,现有 114 项相关检查本地通过;另外用虚拟时钟和一次 503 确认了两个建议合入前补掉的边界:

  1. 派发已被接受,响应跨过 84 分钟截止。 这里 即使已从响应拿到子 run ID,也会直接报超时。此时还没输出 child,所以同组的 清理步骤 不会执行。子任务不会获准执行 PR 代码,但可能继续排队;如果另一组或其他 CI 还在跑,也不会马上触发父流程完成后的清理。建议把已派发、未放行的子任务纳入一个单独的短清理预算,只清理身份已核实的子任务,不重发 POST。
  2. 原 CS 预约已确认取消,上海派发前读 worker 分支 ref 遇到一次 503。 这个 GET 还没走有界重试。我模拟了一次 503 后恢复的场景,当前实际只读了一次,上海派发次数为 0。建议在同一个 selection deadline 内只重试这类临时读失败,保留最终父流程/身份校验和「超时不新派发」边界。

可以分别加「POST 已接受但响应迟到」和「CS 已撤、切上海时 ref GET 一次 503 再恢复」的回归。1 小时上海兜底和已开跑组的行为都不需要改。

@XuPeng-SH
XuPeng-SH merged commit b6918ac into main Nov 27, 2026
1 check passed
@XuPeng-SH
XuPeng-SH deleted the codex/coverage-robust-wait branch November 27, 2026 15:33
XuPeng-SH added a commit to matrixorigin/matrixone that referenced this pull request Nov 27, 2026
## 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 #33177 and #33176.

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

Enable the existing Coverage standby opt-in from the default-branch
workflow for PRs targeting exactly `4.2-dev`. Pin the dispatcher, both
shared workers and the contract to a single CI revision with the
approved release fixture, bounded retries for transient metadata reads,
the selection deadline, and cleanup of accepted workers whose dispatch
receipts arrive late. Coverage for `main` and `4.2-dev` uses the same
shared CS queue and Shanghai IDC fallback. Their legacy route also runs
on Shanghai IDC. Eligible `4.2-dev` PRs run OSS and COS checks in a
focused `pkg/fileservice` job on Shanghai IDC. The job requires passing
SDK and streaming-write tests for each provider's fixture before
publishing its profile. The release report requires that profile and
both selected group profiles. The selected OSS/COS artifact is
downloaded by ID and extracted directly into the merge directory. The
branch also includes the #32922 site-retry opt-in from #33401. [CI
#497](matrixorigin/CI#497) · [CI
#498](matrixorigin/CI#498) · [CI
#500](matrixorigin/CI#500)

All 69 Node tests passed against the current CI pin. The
cross-repository contract recovers HTTP 503 during result polling and
the prior-grant check, then dispatches one replacement and preserves
other workers. The 127 Linux tests cover recovery after 40 seconds of
HTTP 404 and 60 seconds of indexing delay. On release commit `96e18ab`,
the actual provider workflow command rejected malformed provider configs
after `go test` returned a passing package result. A clean `make cgo`
and actionlint passed. An offline replay of the pinned download action
selected the prior-attempt profile by ID and merged all three profiles
using the workflow command.

CI #497, #498 and #500 are merged. All four Coverage references use CI
main commit `f64bda11be08c41efc47705acaa41dfe2795d5f5`. Its tree matches
the reviewed CI #500 head. The branch is synchronized with MatrixOne
main `864bceb`. The four approved S3 fixture blobs match the current
`4.2-dev` tip.

A fresh `4.2-dev` PR run after rollout will verify the live Shanghai OSS
and COS checks, the combined profile, and failed-only retries. The
Shanghai provider connections and end-to-end runtime have yet to be
measured in the new route.
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