Repository navigation
ci(coverage-ut): run embedded-cluster packages in their own pass - #484
Merged
Merged
Conversation
Coverage UT ran all ~500 packages in one `go test -p 8`, so embedded MO clusters overlapped with heavy packages and with the linking of other coverage binaries. A cluster's CN admits execution memory against the runner's free memory minus a 1 GiB reserve, and under that overlap it rejected even trivial statements (matrixorigin/matrixone#33077). The race UT (optools/run_ut.sh) already isolates these packages and does not hit this. scripts/run_coverage_ut_phases.sh now runs two sequential passes: every other package with the existing parallelism, then the embedded-cluster packages alone with COVERAGE_UT_EMBEDDED_PACKAGE_PARALLELISM (2) and a matching cluster admission pool. The packages come from matrixone's own list_embedded_cluster_test_packages (optools/ut_tools.bash), the rule run_ut.sh uses; if the checkout lacks it or the lookup fails, the run falls back to the single pass. The two profiles are joined before the existing compaction step, and the report stays pure go test JSON. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fengttt
enabled auto-merge (squash)
November 24, 2026 06:45
fengttt
disabled auto-merge
November 24, 2026 06:46
fengttt
enabled auto-merge (squash)
November 24, 2026 06:46
fengttt
disabled auto-merge
November 24, 2026 06:46
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the change separating embedded-cluster coverage tests to reduce CI memory contention.
No open issues 🎉
What changed in this PR
This PR separates embedded-cluster coverage tests from other packages to reduce memory contention in coverage CI, following the staging approach used by race UT.
Changes:
- Classifies embedded-cluster packages and runs them in a separate, lower-parallelism pass, with a single-pass fallback if classification is unavailable or fails.
- Joins coverage profiles, preserves JSON output, and records per-pass timing and status.
- Adds contract tests and runs them in the Check Yaml workflow.
| File | Description |
|---|---|
scripts/test_run_coverage_ut_phases.py |
Tests package splitting, output handling, profile joining, and exit statuses. |
scripts/run_coverage_ut_phases.sh |
Implements sequential coverage passes and profile joining. |
.github/workflows/coverage-ut.yaml |
Integrates package classification and the phased coverage runner. |
.github/workflows/check-action-file.yaml |
Adds triggers and execution for the new contract tests. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coverage UT keeps failing on embedded-cluster tests that pass in the race UT (matrixorigin/matrixone#33077). Recent examples: #33115 and #32523. A trivial statement such as
use mo_catalogor a cleanupDROP DATABASEis rejected withWhy only coverage: coverage UT runs all ~500 packages in one
go test -p 8on a 15 GiB runner. Embedded MO clusters overlap with heavy packages (plan,disttae,vm/engine/test) and with the linking of other ~300 MB coverage binaries. A cluster's CN admits execution memory against the runner's free memory minus a 1 GiB reserve, and under that overlap it briefly has none. The race UT (optools/run_ut.sh) runs embedded-cluster packages in their own stage and does not hit this.Change:
scripts/run_coverage_ut_phases.shruns coverage UT as two sequentialgo testpasses with the same flags and-coverpkg:COVERAGE_UT_PACKAGE_PARALLELISM(8, unchanged).COVERAGE_UT_EMBEDDED_PACKAGE_PARALLELISM(2) andMO_TEST_CLUSTER_ADMISSION_POOL_SIZEset to match.list_embedded_cluster_test_packages(optools/ut_tools.bash), the dependency-graph rulerun_ut.shalready uses (currently 11 packages). If the checkout predates that helper or the lookup fails, the run falls back to today's single pass, andclassify_embeddedin the phase timing shows the status.go test -json. A pass warns in plain text for each-coverpkgpackage it does not import; that one warning is filtered, and all other stderr passes through.coverage_ut_ordinary,coverage_ut_embedded) with its package count and elapsed time.Cost: the embedded packages took 2,945 s of package time in the failing run, much of it waiting for each other's cluster admission lock under
-p 8. Run alone with-cover, the three largest took 5.4, 3.5 and 2.4 minutes locally. I expect the pass to add a few minutes to a ~25-minute step that has a 60-minute deadline. The first runs on this branch will give the real number.Testing:
scripts/test_run_coverage_ut_phases.py(added to Check Yaml) drives the script with a fakego. It covers the split, per-pass parallelism and pool, profile joining, a pure-JSON stdout, warning filtering, failure and signal statuses, and the empty-embedded single pass.go: the helper classifies, both passes run, the report has 0 non-JSON lines, andcompact_coverage_profileaccepts the joined profile.Companion: matrixorigin/matrixone#33142 makes embedded test clusters measure memory against a per-process limit instead of the runner's free memory. Either change alone removes most of these failures; together they also cover packages added to the embedded set later.
🤖 Generated with Claude Code