Repository navigation
ci: parallelize native builds in UT jobs - #27706
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? |
|
Self-review completed against One blocking finding was found and fixed: the first implementation always passed Final evidence:
Code review result: PASS, no remaining code blocker. Latest-head platform CI is still the merge gate. |
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27705 ## What this PR does / why we need it: The UT runner already receives an explicit `UT_PARALLEL` CPU budget, but native third-party/CGo preparation ignored it and built serially before race testing began. The analyzed job spent about 5m03s in this phase (about 4m22s in third parties and 33s in CGo). This change: - reuses the existing bounded UT CPU budget for third-party and CGo compilation; - makes the third-party dependency graph safe for parallel make by declaring generated-header and install-directory prerequisites; - keeps ordinary developer builds serial by default; - adds an opt-in for CI to attest that the exact checkout already passed the separately timed `config` canary, avoiding duplicate package-graph verification; - reduces archive extraction log volume. No Go test, package selection, race flag, coverage path, assertion, timeout, or fixture is changed. Native compilation completes before race tests, so this does not raise the race phase process or memory budget. The companion workflow change is matrixorigin/CI#433. It is backward-compatible with older MatrixOne branches, which ignore the new variable and retain the duplicate verification. ### Validation Same commit, clean native build: - baseline serial: 80.43s wall; - candidate parallel run 1: 18.92s wall; - candidate parallel run 2: 17.75s wall; - reduction: 76.5% to 77.9%. Correctness checks: - default `NATIVE_BUILD_JOBS=1` path completed successfully; - serial and parallel `libmo.so` / `libmo.a` SHA256 hashes are identical; - forced compiler failure propagates through recursive make with non-zero status; - native library/archive formats and exported `libmo` symbols verified; - deterministic CGo-transitive external-link test passed with `-count=1`; - CGo-direct package compiled and linked successfully; - default `make -n ut` retains one config verification, while `UT_CONFIGURED=1` removes only that prerequisite and retains the full native/UT path; - `git diff --check` passed. The analyzed explicit config took 28.158s; the companion change avoids repeating the same phony prerequisite while preserving the proxy canary. Full critical-path analysis and follow-up constraints are tracked in matrixorigin#27705.
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27705 ## What this PR does / why we need it: The UT runner already receives an explicit `UT_PARALLEL` CPU budget, but native third-party/CGo preparation ignored it and built serially before race testing began. The analyzed job spent about 5m03s in this phase (about 4m22s in third parties and 33s in CGo). This change: - reuses the existing bounded UT CPU budget for third-party and CGo compilation; - makes the third-party dependency graph safe for parallel make by declaring generated-header and install-directory prerequisites; - keeps ordinary developer builds serial by default; - adds an opt-in for CI to attest that the exact checkout already passed the separately timed `config` canary, avoiding duplicate package-graph verification; - reduces archive extraction log volume. No Go test, package selection, race flag, coverage path, assertion, timeout, or fixture is changed. Native compilation completes before race tests, so this does not raise the race phase process or memory budget. The companion workflow change is matrixorigin/CI#433. It is backward-compatible with older MatrixOne branches, which ignore the new variable and retain the duplicate verification. ### Validation Same commit, clean native build: - baseline serial: 80.43s wall; - candidate parallel run 1: 18.92s wall; - candidate parallel run 2: 17.75s wall; - reduction: 76.5% to 77.9%. Correctness checks: - default `NATIVE_BUILD_JOBS=1` path completed successfully; - serial and parallel `libmo.so` / `libmo.a` SHA256 hashes are identical; - forced compiler failure propagates through recursive make with non-zero status; - native library/archive formats and exported `libmo` symbols verified; - deterministic CGo-transitive external-link test passed with `-count=1`; - CGo-direct package compiled and linked successfully; - default `make -n ut` retains one config verification, while `UT_CONFIGURED=1` removes only that prerequisite and retains the full native/UT path; - `git diff --check` passed. The analyzed explicit config took 28.158s; the companion change avoids repeating the same phony prerequisite while preserving the proxy canary. Full critical-path analysis and follow-up constraints are tracked in matrixorigin#27705.
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27705 ## What this PR does / why we need it: The UT runner already receives an explicit `UT_PARALLEL` CPU budget, but native third-party/CGo preparation ignored it and built serially before race testing began. The analyzed job spent about 5m03s in this phase (about 4m22s in third parties and 33s in CGo). This change: - reuses the existing bounded UT CPU budget for third-party and CGo compilation; - makes the third-party dependency graph safe for parallel make by declaring generated-header and install-directory prerequisites; - keeps ordinary developer builds serial by default; - adds an opt-in for CI to attest that the exact checkout already passed the separately timed `config` canary, avoiding duplicate package-graph verification; - reduces archive extraction log volume. No Go test, package selection, race flag, coverage path, assertion, timeout, or fixture is changed. Native compilation completes before race tests, so this does not raise the race phase process or memory budget. The companion workflow change is matrixorigin/CI#433. It is backward-compatible with older MatrixOne branches, which ignore the new variable and retain the duplicate verification. ### Validation Same commit, clean native build: - baseline serial: 80.43s wall; - candidate parallel run 1: 18.92s wall; - candidate parallel run 2: 17.75s wall; - reduction: 76.5% to 77.9%. Correctness checks: - default `NATIVE_BUILD_JOBS=1` path completed successfully; - serial and parallel `libmo.so` / `libmo.a` SHA256 hashes are identical; - forced compiler failure propagates through recursive make with non-zero status; - native library/archive formats and exported `libmo` symbols verified; - deterministic CGo-transitive external-link test passed with `-count=1`; - CGo-direct package compiled and linked successfully; - default `make -n ut` retains one config verification, while `UT_CONFIGURED=1` removes only that prerequisite and retains the full native/UT path; - `git diff --check` passed. The analyzed explicit config took 28.158s; the companion change avoids repeating the same phony prerequisite while preserving the proxy canary. Full critical-path analysis and follow-up constraints are tracked in matrixorigin#27705.
What type of PR is this?
Which issue(s) this PR fixes:
issue #27705
What this PR does / why we need it:
The UT runner already receives an explicit
UT_PARALLELCPU budget, but native third-party/CGo preparation ignored it and built serially before race testing began. The analyzed job spent about 5m03s in this phase (about 4m22s in third parties and 33s in CGo).This change:
configcanary, avoiding duplicate package-graph verification;No Go test, package selection, race flag, coverage path, assertion, timeout, or fixture is changed. Native compilation completes before race tests, so this does not raise the race phase process or memory budget.
The companion workflow change is matrixorigin/CI#433. It is backward-compatible with older MatrixOne branches, which ignore the new variable and retain the duplicate verification.
Validation
Same commit, clean native build:
Correctness checks:
NATIVE_BUILD_JOBS=1path completed successfully;libmo.so/libmo.aSHA256 hashes are identical;libmosymbols verified;-count=1;make -n utretains one config verification, whileUT_CONFIGURED=1removes only that prerequisite and retains the full native/UT path;git diff --checkpassed.The analyzed explicit config took 28.158s; the companion change avoids repeating the same phony prerequisite while preserving the proxy canary. Full critical-path analysis and follow-up constraints are tracked in #27705.