Repository navigation
ci: shard race UT suite - #28575
ci: shard race UT suite#28575
Conversation
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed live head 8b0040f against base/merge-base 2a6fe7f, including the live reusable CI consumer at matrixorigin/CI commit 2ab1af3a85ca3c4e4eab7483201aca3e1913dd99.
No concrete blocker found. This is a bounded activation of the existing sharding contract, not a new sharding/lifecycle design. The caller passes the declared boolean input and retains ut_parallel=6. The four shards cover light+HNSW, exclusive issues, embedded, and heavy+plan exactly once; run_ut.sh validates both the stage partition and the complete package partition before testing. It retains race-instrumented execution, existing test selection/exclusions and per-package timeout behavior, and fails closed for invalid routing or discovery. UT-only versus full-suite classification and the independent coverage workflow are unchanged.
The reusable workflow checks out the event's immutable head SHA, bounds fan-out to four jobs, disables matrix fail-fast, and preserves 'UT Test on Ubuntu/x86' on an always-run summary which requires the matrix result to be success. Test/build/report-transfer failures remain nonzero; diagnostic printing cannot turn a failed test step green. Existing process-group termination and bounded TERM/KILL cleanup remain in place. Issues retain their exclusive runner, embedded cluster lifecycle admission stays in its shard, and heavy/engine process budgets remain unchanged. Splitting runners does not introduce shared in-process state or increase per-runner package concurrency.
Validation performed read-only against git-object contents: all eight change-scope Node tests passed, including the new caller contract and required-check negative controls; the exact-head shell stage partition and unknown-shard rejection passed; git diff --check passed. Author's optools and actionlint evidence was inspected; I did not run the full race suite or wait for CI.
Operational follow-up: four runner jobs duplicate build/discovery overhead and can increase total runner minutes or queue pressure even while reducing the critical path. Actual target-runner wall time/peak memory and successful aggregate-check publication still need the documented first trusted-caller run or CI-owner dispatch, because pull_request_target does not exercise this PR's changed caller before merge. This limitation is explicit, not evidence of a missing test target or a reason to attribute the earlier timeout to a particular test.
8b0040f to
6381f13
Compare
6381f13 to
6806093
Compare
6806093 to
12ec9bf
Compare
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Merge Queue Status
This pull request spent 9 minutes 57 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [x] Improvement - [x] Test and CI ## Which issue(s) this PR fixes: Related to #28419 and #28538. ## What this PR does / why we need it: Keep the complete race-UT suite on one runner and reuse engine capacity to run plan tests while the remaining resource-heavy tests finish. A historical single-runner trace left engine slots idle from 06:22:22 to 06:26:04, then ran plan for about another 2m20s. With the default budget of three, execution changes from `engine(2) + resource(1)` to `plan(1) + resource(1)` after engine exits. Plan compilation retains `-p1`. `UT_OVERLAP_PLAN=1` enables this by default; `0` provides the sequential baseline. Budgets of one/two and paths without a concurrent engine helper keep sequential execution. The CI caller restores `ut_sharded: false`, undoing #28575's multi-runner topology; that restoration itself is not counted as a speedup against the previous single-runner baseline. The parent keeps the foreground PID and independent command metadata while joining engine. Engine failure remains a failure and does not skip plan. Report merging waits for the heavy writer to exit, avoiding data loss from renaming an open output file. Cancellation signals all owned groups before bounded waits and merges stopped writers only. No test cases, data sizes, assertions, race flags, timeouts, cluster admission, or coverage jobs are weakened. The logservice companion experiment was removed: package elapsed time alone did not demonstrate critical-path savings. ### Validation - `go test -race ./optools -count=1` - Both new scheduling/cancellation tests passed individually with `-race -count=3`; scheduling covers defaults, overlap, each stage failing, sequential mode, and budgets 1/2. - `go vet ./optools` - `node --test .github/ci/change-scope.test.cjs` - `bash -n optools/run_ut.sh` and `git diff --check` - Independent GPT-6 medium review: no blocking or medium findings. - Real heavy/plan runs passed with the repository CGo wrapper, `-race`, `matrixone_test`, and the unchanged three-slot budget. The warm sequential baseline took 303.11s; overlap took 229.19s: 73.92s (24.4%) less elapsed time for this local stage sample. Both runs had exactly the same 16,013 test/subtest start events and terminal statuses, with zero failures. - A first cold baseline took 440.04s and is excluded from the claimed gain. Measurement order was cold sequential, warm overlap, then warm sequential. This is one local macOS comparison, not a controlled Linux CI benchmark. The heavy/plan scheduler was invoked directly, with existing native artifacts verified by the official wrapper; checkout, native prerequisite rebuild, and full-suite setup were excluded equally from both measurements. External-service eligibility remains environment-dependent. - The historical CI trace suggests roughly 2m20s of potential overlap; this is not a measured CI saving. Target Linux CI still needs to confirm peak memory and net elapsed time. This repository uses `pull_request_target`, so this PR still uses the base workflow's four-job caller until merged. Its heavy-plan job does execute the updated scheduler from the PR head; the single-runner caller is covered by the workflow contract test.
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to matrixorigin#28538 ## What this PR does / why we need it: ### Root cause The MatrixOne workflow called the reusable CI workflow without its existing `ut_sharded` input. The reusable workflow therefore executed `UT_SHARD=all`: light, issues, embedded, heavy, and plan stages shared one 70-minute outer deadline. Three observed runs exhausted that aggregate deadline in different stages without a terminal test failure or race report. ### Changes Enable the reusable workflow four-way race-UT contract. It runs the complete, disjoint `light`, `issues`, `embedded`, and `heavy-plan` stage groups in separate jobs and retains the existing aggregate required check. Add a workflow-contract unit test that locks the caller input; refactor the existing job parser so both workflow tests share it. ### Issue-to-test proof `entrypoint enables the complete race-UT shard contract` proves the caller supplies `ut_sharded: true` with the established per-runner parallelism. `TestUTShardStagesFormCompleteDisjointMap` proves those target groups are a complete, non-overlapping partition; its negative companion rejects unknown routing values. ### Tests Rebased onto `269d59addd032d20897cc4d86f58de3e387a6d76` and reran: - `node --test .github/ci/change-scope.test.cjs` - `GOWORK=off go test -mod=readonly -v -count=1 -timeout=120s ./optools` - `go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/entrypoint.yaml` - Ruby YAML parse and `git diff --check`\n- MatrixOne ALL CI run 34446145941 completed successfully, including `CI Required` and the Ubuntu/x86 race-UT check; as documented below, `pull_request_target` ran the trusted base caller, not this changed caller input. ### Residual risk The change uses four runners rather than one, as designed by the reusable workflow. This repository uses `pull_request_target`, so the CI run for this Draft PR evaluates the trusted base caller and cannot exercise the changed `ut_sharded` input. Target-runner confirmation therefore requires the first post-merge CI run or a CI-owner-dispatched sharded run; the change preserves per-test and timeout diagnostics instead of masking failures. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…8632) ## What type of PR is this? - [x] Improvement - [x] Test and CI ## Which issue(s) this PR fixes: Related to matrixorigin#28419 and matrixorigin#28538. ## What this PR does / why we need it: Keep the complete race-UT suite on one runner and reuse engine capacity to run plan tests while the remaining resource-heavy tests finish. A historical single-runner trace left engine slots idle from 06:22:22 to 06:26:04, then ran plan for about another 2m20s. With the default budget of three, execution changes from `engine(2) + resource(1)` to `plan(1) + resource(1)` after engine exits. Plan compilation retains `-p1`. `UT_OVERLAP_PLAN=1` enables this by default; `0` provides the sequential baseline. Budgets of one/two and paths without a concurrent engine helper keep sequential execution. The CI caller restores `ut_sharded: false`, undoing matrixorigin#28575's multi-runner topology; that restoration itself is not counted as a speedup against the previous single-runner baseline. The parent keeps the foreground PID and independent command metadata while joining engine. Engine failure remains a failure and does not skip plan. Report merging waits for the heavy writer to exit, avoiding data loss from renaming an open output file. Cancellation signals all owned groups before bounded waits and merges stopped writers only. No test cases, data sizes, assertions, race flags, timeouts, cluster admission, or coverage jobs are weakened. The logservice companion experiment was removed: package elapsed time alone did not demonstrate critical-path savings. ### Validation - `go test -race ./optools -count=1` - Both new scheduling/cancellation tests passed individually with `-race -count=3`; scheduling covers defaults, overlap, each stage failing, sequential mode, and budgets 1/2. - `go vet ./optools` - `node --test .github/ci/change-scope.test.cjs` - `bash -n optools/run_ut.sh` and `git diff --check` - Independent GPT-6 medium review: no blocking or medium findings. - Real heavy/plan runs passed with the repository CGo wrapper, `-race`, `matrixone_test`, and the unchanged three-slot budget. The warm sequential baseline took 303.11s; overlap took 229.19s: 73.92s (24.4%) less elapsed time for this local stage sample. Both runs had exactly the same 16,013 test/subtest start events and terminal statuses, with zero failures. - A first cold baseline took 440.04s and is excluded from the claimed gain. Measurement order was cold sequential, warm overlap, then warm sequential. This is one local macOS comparison, not a controlled Linux CI benchmark. The heavy/plan scheduler was invoked directly, with existing native artifacts verified by the official wrapper; checkout, native prerequisite rebuild, and full-suite setup were excluded equally from both measurements. External-service eligibility remains environment-dependent. - The historical CI trace suggests roughly 2m20s of potential overlap; this is not a measured CI saving. Target Linux CI still needs to confirm peak memory and net elapsed time. This repository uses `pull_request_target`, so this PR still uses the base workflow's four-job caller until merged. Its heavy-plan job does execute the updated scheduler from the PR head; the single-runner caller is covered by the workflow contract test.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #28538
What this PR does / why we need it:
Root cause
The MatrixOne workflow called the reusable CI workflow without its existing
ut_shardedinput. The reusable workflow therefore executedUT_SHARD=all: light, issues, embedded, heavy, and plan stages shared one 70-minute outer deadline. Three observed runs exhausted that aggregate deadline in different stages without a terminal test failure or race report.Changes
Enable the reusable workflow four-way race-UT contract. It runs the complete, disjoint
light,issues,embedded, andheavy-planstage groups in separate jobs and retains the existing aggregate required check. Add a workflow-contract unit test that locks the caller input; refactor the existing job parser so both workflow tests share it.Issue-to-test proof
entrypoint enables the complete race-UT shard contractproves the caller suppliesut_sharded: truewith the established per-runner parallelism.TestUTShardStagesFormCompleteDisjointMapproves those target groups are a complete, non-overlapping partition; its negative companion rejects unknown routing values.Tests
Rebased onto
269d59addd032d20897cc4d86f58de3e387a6d76and reran:node --test .github/ci/change-scope.test.cjsGOWORK=off go test -mod=readonly -v -count=1 -timeout=120s ./optoolsgo run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/entrypoint.yamlgit diff --check\n- MatrixOne ALL CI run 34446145941 completed successfully, includingCI Requiredand the Ubuntu/x86 race-UT check; as documented below,pull_request_targetran the trusted base caller, not this changed caller input.Residual risk
The change uses four runners rather than one, as designed by the reusable workflow. This repository uses
pull_request_target, so the CI run for this Draft PR evaluates the trusted base caller and cannot exercise the changedut_shardedinput. Target-runner confirmation therefore requires the first post-merge CI run or a CI-owner-dispatched sharded run; the change preserves per-test and timeout diagnostics instead of masking failures.