Repository navigation
test: tighten UT preparation ownership and cost diagnostics - #29026
Conversation
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Force review for exact head aec1200.
Scope reviewed: all 12 changed files, including optools/run_ut.sh, ut_tools.bash, the scheduler/holder/native tests, the UT cost-attribution summarizer, pkg/embed/operator.go and its tests, Makefile/workflow provenance wiring, and the design document.
Conclusion: no evidence-backed P0/P1/P2 blocker.
- The optional embedded prebuild is bounded and build-only; the authoritative full-scope go test remains the sole executor. Prebuild failures fall back to the authoritative run, and scheduler tests cover success, failure, cancellation, cleanup, report handling, and the exactly-once execution invariant.
- Native-artifact reuse is gated by provenance (OS/arch, accelerator, optimization, SIMSIMD); stale or missing provenance falls back to make cgo.
- HAKeeper retries inherit the owner deadline and are cancellation-aware. The successful client/context ownership contract is covered by tests.
- Cost diagnostics distinguish explicit admission release from process-exit upper bounds and unresolved/truncated captures; overlapping holders are not presented as wall-time savings. The script timeout default is aligned with the Makefile 120-minute hard timeout.
- Required CI is green, including Ubuntu UT, coverage, native build/contract, shared build, and BVT checks. The PR is mergeable with no conflict; it is only behind the base branch.
This is a comment-only review because the PR is authored by the review requester.
…igin#29026) ## What type of PR is this? - [x] Improvement - [x] Test and CI ## Which issue(s) this PR fixes: matrixorigin#28419 ## What this PR does / why we need it: Improve UT cost attribution and the existing infrastructure without removing test cases or increasing cluster concurrency. - Reuse Makefile-prepared native artifacts only after the existing provenance verifier validates source, platform and build mode. Direct script calls and stale artifacts still run `make cgo`. - Reclaim completed optional embedded-prebuild slots instead of waiting for the oldest child. Preserve bounded child ownership, cancellation, diagnostics and run-local artifact cleanup. - Keep the original full-scope `go test` as the sole embedded test executor, including its timeout and output-drain behavior. Prebuild remains cache warming and is **off by default**. - Make HAKeeper client attempts inherit the existing startup deadline and make retry waiting cancellation-aware. Healthy retry cadence and readiness criteria are unchanged. - Distinguish explicitly released cluster admission from a package-exit upper bound and incomplete captures. Do not attribute later startless captures to terminated processes. - Align the script's diagnostic timeout default with the existing Makefile 120-minute default. This does not increase the Makefile budget and is not a speedup claim. The long Arrow admission waits in two historical CI runs overlapped DML holder work. Summing those waits is not a valid estimate of suite time savings. The separate transaction optimization in matrixorigin#29027 addresses actual holder work; this PR does not change DML tests or production transaction behavior. ### Validation Local macOS/arm64, Go 1.26.4: - Full `optools`: PASS (50.666s); `go vet`, shell syntax and diff checks pass. - Full `embed`: normal PASS (41.787s), race PASS (61.698s); readiness helper race stress ×100 passes. - Authoritative-execution/cancellation contracts: race ×8/×20 pass. - Native build/provenance contracts and holder-generation regressions pass. - Real native preparation: after `make cgo`, verified reuse takes 0.51s without another make; redundant incremental make control takes 4.46s. Local evidence only. - Separate GPT-6 medium design and final infrastructure review: approved, no remaining source blockers. Existing case selection, data, assertions, race mode and package concurrency are preserved. ### Performance and limits No whole-suite Linux speedup is claimed. Optional scheduling defaults remain unchanged; promotion requires comparable complete-run wall-time and memory evidence. No CI wait or merge is requested by this delivery. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…igin#29026) ## What type of PR is this? - [x] Improvement - [x] Test and CI ## Which issue(s) this PR fixes: matrixorigin#28419 ## What this PR does / why we need it: Improve UT cost attribution and the existing infrastructure without removing test cases or increasing cluster concurrency. - Reuse Makefile-prepared native artifacts only after the existing provenance verifier validates source, platform and build mode. Direct script calls and stale artifacts still run `make cgo`. - Reclaim completed optional embedded-prebuild slots instead of waiting for the oldest child. Preserve bounded child ownership, cancellation, diagnostics and run-local artifact cleanup. - Keep the original full-scope `go test` as the sole embedded test executor, including its timeout and output-drain behavior. Prebuild remains cache warming and is **off by default**. - Make HAKeeper client attempts inherit the existing startup deadline and make retry waiting cancellation-aware. Healthy retry cadence and readiness criteria are unchanged. - Distinguish explicitly released cluster admission from a package-exit upper bound and incomplete captures. Do not attribute later startless captures to terminated processes. - Align the script's diagnostic timeout default with the existing Makefile 120-minute default. This does not increase the Makefile budget and is not a speedup claim. The long Arrow admission waits in two historical CI runs overlapped DML holder work. Summing those waits is not a valid estimate of suite time savings. The separate transaction optimization in matrixorigin#29027 addresses actual holder work; this PR does not change DML tests or production transaction behavior. ### Validation Local macOS/arm64, Go 1.26.4: - Full `optools`: PASS (50.666s); `go vet`, shell syntax and diff checks pass. - Full `embed`: normal PASS (41.787s), race PASS (61.698s); readiness helper race stress ×100 passes. - Authoritative-execution/cancellation contracts: race ×8/×20 pass. - Native build/provenance contracts and holder-generation regressions pass. - Real native preparation: after `make cgo`, verified reuse takes 0.51s without another make; redundant incremental make control takes 4.46s. Local evidence only. - Separate GPT-6 medium design and final infrastructure review: approved, no remaining source blockers. Existing case selection, data, assertions, race mode and package concurrency are preserved. ### Performance and limits No whole-suite Linux speedup is claimed. Optional scheduling defaults remain unchanged; promotion requires comparable complete-run wall-time and memory evidence. No CI wait or merge is requested by this delivery. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
#28419
What this PR does / why we need it:
Improve UT cost attribution and the existing infrastructure without removing test cases or increasing cluster concurrency.
make cgo.go testas the sole embedded test executor, including its timeout and output-drain behavior. Prebuild remains cache warming and is off by default.The long Arrow admission waits in two historical CI runs overlapped DML holder work. Summing those waits is not a valid estimate of suite time savings. The separate transaction optimization in #29027 addresses actual holder work; this PR does not change DML tests or production transaction behavior.
Validation
Local macOS/arm64, Go 1.26.4:
optools: PASS (50.666s);go vet, shell syntax and diff checks pass.embed: normal PASS (41.787s), race PASS (61.698s); readiness helper race stress ×100 passes.make cgo, verified reuse takes 0.51s without another make; redundant incremental make control takes 4.46s. Local evidence only.Existing case selection, data, assertions, race mode and package concurrency are preserved.
Performance and limits
No whole-suite Linux speedup is claimed. Optional scheduling defaults remain unchanged; promotion requires comparable complete-run wall-time and memory evidence. No CI wait or merge is requested by this delivery.