Repository navigation
ci: show GROUP0 and GROUP1 with live Coverage UT progress - #487
Conversation
(cherry picked from commit 542fffe)
|
Possible 4.2-dev integration gap: the new admission tests change Using the otherwise valid 4.2-dev fixture with caller If a real 4.2-dev |
|
@XuPeng-SH Thanks for flagging this. Keeping the caller on A concrete example is MatrixOne #33009, which targeted That run used the legacy coverage route. It confirms the caller identity, not the new two-group scheduling. A real |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Blocking: the 204 dispatch fallback can miss its own worker
Introduced in 68119ed6 and still present at f0c05d79. When dispatch returns HTTP 204 with no run ID, discovery uses the shared display title (GROUP0/GROUP1). A different PR's same-title run whose identity marker is still pending can prevent discovery from returning our worker even after our worker's exact identity marker is visible. The parent then times out while the intended worker is already running. With mocked GitHub responses, the base found the worker on the first read; the introducing commit and the PR head both exhausted 24 waits. The explicit run-ID response path passed.
Please keep display names separate from discovery: explicitly request a run ID where supported, and keep the fallback unambiguous if 204 remains supported. Preserve the existing strict identity checks. Add a regression test for a verified current worker alongside an unrelated same-title worker with pending metadata.
Two non-blocking follow-ups: throttle the job-detail API reads, not just the printed progress lines; and emit the compact failure summary before optional tool installation/analysis so it survives a step timeout.
|
@XuPeng-SH 鹏哥,麻烦复审一下。你指出的 204 派发回退问题已在 5892c7e 修复:优先请求 run ID,回退时按完整身份匹配,其他 PR 的同名待索引作业不会再卡住已核验的 worker。进度查询频率和失败摘要顺序也已调整。69 项定向测试通过,最新 CI 已绿。 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Requesting changes on 5892c7e: the 4.2-dev rollout is incompatible with the current branch's S3 test fixtures, and the new failure reporting is broken across the actual checkout sequence. I also found an unhandled pending identity state and a gap in pre-report phase reporting.
The previous 204 case with an entirely absent marker is covered by the new regression test; the queued-marker case below is a separate state. Validation included the compiled 4.2-dev fileservice test list, the real trial's checkout log, and focused local reproductions. I did not dispatch a live 4.2-dev worker.
|
|
||
| PROJECT = "matrixorigin/matrixone" | ||
| ENTRY = PROJECT + "/.github/workflows/entrypoint.yaml@refs/heads/main" | ||
| CACHE_BASE_REFS = frozenset({"main", "4.2-dev"}) |
There was a problem hiding this comment.
[P1] The current 4.2-dev branch cannot pass either worker's mandatory S3 smoke. Both coverage-worker-cs.yaml and coverage-worker-idc.yaml require a passing TestCSStoragePrefixScopedInitialization, but the current 4.2-dev base (d2bc81d9) does not define it. A compiled test listing for its unchanged fileservice package returned TestObjectStorages and TestS3FSFromSpecs only. Consequently an ordinary 4.2-dev PR routed here fails before the coverage suite, including after Shanghai fallback. The 4.2-dev fixture also overwrites the configured object prefix rather than honoring MO_CI_S3_PREFIX, so simply dropping the assertion would not establish the intended storage isolation. Please keep this branch on the legacy route until the fixture and its prefix-scoped S3 behavior are available and validated on 4.2-dev, or deliver and verify that prerequisite with the rollout.
| if [ ! -s "${report}" ]; then | ||
| echo 'UT JSON report was not produced; inspect the failed test step.' | tee -a "${summary}" | ||
| else | ||
| python3 -I "$GITHUB_WORKSPACE/.standby/scripts/summarize_ut_report.py" "${report}" \ |
There was a problem hiding this comment.
[P2] The source checkout deletes this helper before it is used. The first checkout puts .standby under $GITHUB_WORKSPACE, then Checkout MatrixOne source checks out into the workspace root. The same pinned checkout action deletes that root's existing contents when it has no root .git; the linked trial's job log shows exactly that sequence. On a UT failure with a report, this command therefore cannot find the helper; || true hides the error, so neither the compact red-step details nor the previous detailed summary is produced. The test creates .standby directly and skips the real checkout ordering. Please put the trusted helper somewhere that survives the root checkout or load it afterwards, and cover that lifecycle in the test.
| check(len(marked) == 1, "ambiguous worker identity") | ||
| marker = marked[0] | ||
| check(marker["run_id"] == r and marker["run_attempt"] == 1 | ||
| and marker["status"] == "completed" and marker["conclusion"] == "skipped", |
There was a problem hiding this comment.
[P2] A visible but not yet completed identity marker aborts dispatch instead of waiting. When the jobs API returns the marker with status: queued and a null conclusion before its eventual completed/skipped state, this raises ValueError, whereas dispatch and admit only retry WorkerIdentityPending. With mocked API responses I reproduced immediate failure on the first read even when the dispatch response contains the correct run ID; on a 204 response, an unrelated same-title worker in this state also blocks an already verified candidate. The companion MatrixOne cancellation code explicitly treats a non-completed marker as pending. Please retry this transient state while continuing to reject mismatched run/attempt and completed markers with an invalid conclusion; add controls for both the returned-ID path and an unrelated same-title candidate. This timing was reproduced with mocked API data, not a live injected GitHub response.
| if [[ -s "$status" && ! -L "$status" ]]; then | ||
| jq -r '.reason | strings | gsub("[^a-zA-Z0-9_]"; "") | .[0:80] | "Coverage UT status: " + .' "$status" || true | ||
| fi | ||
| if [[ -s "$phase" && ! -L "$phase" ]]; then |
There was a problem hiding this comment.
[P2] Several pre-report failures still cannot show their phase in the red step. phase_end writes a prepare_cgo timeout to ut-coverage-timeout.txt, not this phase-failure file, and a nonzero cs_s3_smoke result does not create the phase-failure file at all. Before the coverage runner starts there is also no status or test report, so this step prints only Coverage UT failed. I reproduced both paths using the workflow's actual phase_end and red-step scripts. Please propagate the phase for all pre-report failures and timeouts through one bounded diagnostic contract, and exercise the actual producer in the test rather than only precreating its output file.
|
@XuPeng-SH 鹏哥,麻烦继续复审。748ed78 修了这轮三处 CI 问题:身份标记仍在排队时会等待;错误摘要脚本已移到源码 checkout 不会清掉的位置;CGO 超时和 S3 smoke 失败会在报红步骤显示阶段。4.2-dev 缺的 S3 隔离测试单独回移到 MatrixOne #33247,不会跳过必跑的 S3 检查;等前置合入后再用真实 4.2-dev PR 验证两组。71 项 CI 定向测试和 5 项本地 S3 测试已通过,最新 GitHub CI 还在跑。 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Requesting changes on 748ed782 for the 4.2-dev rollout and timeout failure display. The 204 fallback issue below is a lower-priority reliability follow-up.
The current production pins have not activated this rollout. Please ensure the companion rollout cannot route an older 4.2-dev PR head into the mandatory S3 smoke without its prerequisite.
Validation: 71 targeted tests, 10 phase tests, and actionlint passed in Linux. The timeout issue was reproduced with real Go 1.26.4 go test -json output. The 204 lookup case was reproduced with mocked API responses. No live 4.2-dev worker was dispatched.
| member_status != 204 or "kind/test-ci" not in labels): | ||
| # Draft and PR type labels do not alter CS eligibility. The old path | ||
| # still enforces its own org/safe-to-test eligibility. | ||
| if base not in CACHE_BASE_REFS or live["head"]["repo"]["archived"] or member_status != 204: |
There was a problem hiding this comment.
[P1] Gate 4.2-dev on the actual PR head having the required S3 fixtures. After #33247 merges into the base, existing PR heads do not automatically contain it. For example, the current head of MatrixOne #33103 is an eligible organization-member 4.2-dev PR but lacks TestCSStoragePrefixScopedInitialization and the scoped fixture. This code routes that head to cache, and both workers check out that exact head and require the smoke test, so they fail when the companion pins are activated. Route incompatible heads through the existing path or otherwise enforce the prerequisite for every admitted head.
| for _, package, test, _ in test_failures: | ||
| if not test and package in named_packages: | ||
| continue # the named tests already explain this package's failure | ||
| outputs = test_outputs.get((package, test), []) if test else package_outputs.get(package, []) |
There was a problem hiding this comment.
[P2] Preserve panic output when the named test does not have a fail event. A real Go 1.26.4 go test -json timeout emits panic: test timed out under the running test name, then a package-level fail with no test name. With more than 80 lines of goroutine stacks, the package tail no longer contains the panic, and this lookup only selects panic entries whose test is empty. I reproduced the final red step printing only FAILED ... / <package>, without the timed-out test or reason. Include unmatched test-attributed panic samples and cover this real JSON shape.
| display = candidate["display_title"] | ||
| if display == title(t, pool): | ||
| ids.append(candidate["id"]) | ||
| elif t.get("title_version") == 2 and display == short_title(t): |
There was a problem hiding this comment.
[P3] In the 204 fallback, a different same-title run can disappear between the workflow-runs listing and its jobs lookup. An HTTP 404 from that unrelated candidate propagates out of identity_title and aborts dispatch even if this request's worker is present and verifiable. I reproduced this with mocked API responses. Handle a vanished candidate or retry boundedly while retaining full identity checks for the selected worker.
|
@XuPeng-SH 鹏哥,麻烦复审一下
本地 71 项定向测试、actionlint 和 git diff --check 已通过。另有一项阶段测试在本机因缺少 C.UTF-8 失败,修改前的提交也能复现。 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
The latest revision addresses the previously reported 4.2-dev routing, missing timeout headline, and vanished-candidate cases. I found a remaining rollout blocker for main PRs newly admitted by the label and draft changes, plus a failure-display regression when a named test failure and a package panic occur together.
The exact-head Check Yaml run succeeded, including actionlint. I also ran 81 local tests and replayed the production route, both mandatory smoke assertions, and the final red step with controlled inputs. The smoke and red-step replays used local fixtures.
Please align the rollout text here and in MatrixOne #33176 with the current main-only route. The 4.2-dev rollout remains deferred.
| member_status != 204 or "kind/test-ci" not in labels): | ||
| # Draft and PR type labels do not alter CS eligibility. The old path | ||
| # still enforces its own org/safe-to-test eligibility. | ||
| if base not in CACHE_BASE_REFS or live["head"]["repo"]["archived"] or member_status != 204: |
There was a problem hiding this comment.
[P1] Verify the S3 prerequisite for newly admitted main PR heads. The label and draft gate removal can also move stale main heads onto the new route. MatrixOne #32160 is open, has member author association, a kind/bug label, and changes production Go code that the parent classifies as full. Its exact head ce0f9958 lacks TestCSStoragePrefixScopedInitialization, added by #32590. Replaying the API metadata with confirmed-membership status 204 returns legacy on the base and cache here. Both CS and Shanghai check out the exact head and require a pass event from that test before the suite, so both paths fail once the production pins are switched. Route incompatible heads to the existing coverage path before dispatch, with a stale-head case and a compatible unlabelled-head control.
| entries = [(package, "build failed", build_outputs.get(package, [])) for _, package in build_failures] | ||
| entries.extend((package, test, lines) for (package, test), lines in unmatched_panics.items()) | ||
| for _, package, test, _ in test_failures: | ||
| if not test and package in named_packages: |
There was a problem hiding this comment.
[P2] Preserve a separate package-level panic when a named test has already failed. The package-level fail is skipped whenever named_packages contains that package, even when the parser captured a separate panic with an empty Test field. I ran the actual summarizer and red-step shell with a JSON report containing a named assertion failure followed by a package-level teardown panic and package fail. The detailed summary retained the panic, but the red step printed only the assertion. Keep the bounded package panic when it carries distinct evidence, and cover the mixed-failure case alongside the existing timeout test.
|
@XuPeng-SH 鹏哥,麻烦复审一下
73 项本地定向测试、actionlint 和 git diff --check 均通过。 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
I verified both previous fixes on 4eb9f6d. The fixture listing from MatrixOne #32160 lacks the required blobs, while current main and the compatible unlabelled #33199 head match the reviewed blobs. The mixed named-test failure and package-panic regression test also passes. All 83 local tests passed, and the exact-head Check Yaml run passed.
One new failure path in the fixture query still prevents the intended legacy fallback. I reproduced it with the standard HTTP client and a loopback HTTP server.
| if len(raw) > limit: | ||
| return False | ||
| entries = json.loads(raw) | ||
| except (URLError, TimeoutError, ValueError): |
There was a problem hiding this comment.
[P2] Fall back to legacy when the fixture connection drops or the response is incomplete. urllib can propagate http.client.RemoteDisconnected directly from open() and http.client.IncompleteRead from read(). Neither matches this handler, so the admission step exits before emitting route=legacy and the coverage workflow skips both paths. I reproduced both with a loopback server. The healthy response selected cache and HTTP 503 selected legacy as controls. Handle transport and HTTP protocol errors within this optional lookup, and add a regression case for a disconnect or truncated body. Keep the existing fail-closed PR identity and membership checks.
|
@XuPeng-SH 鹏哥,麻烦复审一下 已补断连和截断响应的回归测试。75 项本地定向测试、actionlint 和 git diff --check 均通过。 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
The initial-admission fallback is fixed on c7a42be. Disconnects, incomplete reads, and length mismatches now produce the legacy route. All 85 local tests and the exact-head Check Yaml workflow passed.
The same failure cases still break failed-group reruns after the initial run has already verified the exact source and head. I reproduced this by feeding the production entrypoint outputs into the actual retry verification shell step.
| member_status != 204 or "kind/test-ci" not in labels): | ||
| # Draft and PR type labels do not alter CS eligibility. The old path | ||
| # still enforces its own org/safe-to-test eligibility. | ||
| if base not in CACHE_BASE_REFS or live["head"]["repo"]["archived"] or member_status != 204: |
There was a problem hiding this comment.
[P2] An optional fixture lookup can abort a failed-group rerun for the exact SHA already admitted. The retry runs this entrypoint again. On a fixture HTTP 503 or disconnect it now correctly returns route=legacy, allowed=false for initial admission, but the retry selector rejects that output before dispatch. The legacy job cannot take over because it depends on the original top-level route, and GitHub retains the outputs of jobs outside a failed-job rerun. I reproduced exit 1 in the actual retry step with unchanged PR source, SHA, base, and valid membership. The healthy control passes, and the base entrypoint admitted the same established label case without the fixture request. Reuse the original trusted evidence for the exact immutable repository and SHA during group-only retries, while still rechecking current PR identity and membership. Add a regression that exercises the retry gate as well as initial routing.
|
@XuPeng-SH 鹏哥,麻烦复审一下 补了覆盖实际重跑校验步骤的回归测试,验证同一 head 能通过,仓库或 SHA 不匹配、PR 已变更、成员资格未通过时会拒绝。76 项本地定向测试、actionlint 和 git diff --check 均通过。 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approved 3af8b7c. The failed-group retry now receives the exact source and SHA from the trusted parent eligibility outputs and still rechecks the live PR, target, and organization membership before issuing an attempt-specific receipt.
I replayed the actual admission entrypoint and retry shell step with a fixture API 503. The previous revision rejected the retry. The current revision passed without a fixture request for the previously admitted SHA. A full rerun still checked the fixture and selected legacy, and revoked membership and a stale target both prevented the retry from receiving a receipt. All 86 local tests and the exact-head Check Yaml workflow passed.
This review covers the CI code. The production pin update and live two-group verification remain part of MatrixOne #33176.
Backport the test-only S3 fixtures from MatrixOne #32590. This provides the mandatory prefix-scoped initialization test and preserves MO_CI_S3_PREFIX for the basic and streaming tests. No production Go code or CI configuration changes. Prerequisite for [CI #487](matrixorigin/CI#487). Keep the 4.2-dev rollout disabled until this backport is merged and a real PR containing the fixture passes the restricted-account smoke tests. Older heads must sync 4.2-dev before retrying. Do not remove or skip the required smoke assertions. Locally verified the five focused Go tests using the local HTTP fixture, plus the compiled listing of all three required test entry points. No live CS/Shanghai worker was dispatched. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What to review
This PR rolls out two-group Coverage UT and its progress display for eligible MatrixOne PRs targeting
main. The4.2-devrollout is deferred.Allow eligible MatrixOne PRs targeting exactly
mainto use the two-group CS scheduler with Shanghai standby. Admission checks the exact PR head for the reviewed S3 fixture files and uses legacy coverage if it cannot verify them. Bind the base branch to the admission receipt and recheck it before PR checkout. Other branches retain their existing behavior.Show GROUP0 / GROUP1 and report queue time, runner site and current phase, with direct links to the UT logs. Keep full identity validation for dispatch, cancellation and failed-group reruns, with backward compatibility for older worker runs.
In the failing CS Coverage UT step, print failed package/test names, short error excerpts, and the failure phase when no test report exists. Reuse the existing analysis data rather than scanning the large report again.
No changes to UT implementation, BVT, cache writes, runner permissions or queue thresholds.
Verification and rollout
73 focused tests, actionlint and git diff --check passed locally. Regression coverage includes a stale main-targeting head, a compatible unlabelled head, and a failure report containing both a named assertion and a separate package panic. The fixture check was also verified against the actual head of MatrixOne #32160 and a current main commit.
After this PR merges, update the MatrixOne parent and both worker pins together to the actual merged Git commit in MatrixOne #33176. Validate short-title job metadata in GitHub Actions and run one eligible
mainPR to verify two groups and coverage feedback. No four-site rerun required. Do not merge #486 separately.Pre-merge trial on an unlabelled refactor PR: https://github.com/matrixorigin/matrixone/actions/runs/45543448097
Both workers were admitted without the label: GROUP0 (CS MTY) and GROUP1 (CS JED). This verifies CS admission and startup, not the final UT or coverage result.
Dispatch identity follow-up
Request the exact child run ID. For 204 responses, reconcile by the full ticket identity: an unindexed same-title run cannot block a verified match, and duplicate verified matches still fail closed. Throttle worker job-detail lookups independently of terminal-status polling. Generate the compact failure summary before optional UT analysis.
4.2-dev rollout prerequisite
MatrixOne #33247 ports the prefix-isolated S3 test fixtures. Do not activate these CI pins for 4.2-dev until the prerequisite is merged and the intended PR head includes it. Then verify a real 4.2-dev run, including the required restricted-account S3 smoke in both groups, before calling the migration complete. The smoke remains mandatory for both CS and Shanghai. The local 4.2-dev fixture tests passed; no live worker was dispatched for this fix.
The CI follow-up treats correctly bound queued identity markers as pending, saves the pinned reporting helper outside the source checkout, and carries pre-report failure phases to the red step, including CGO timeout and S3 smoke failure.