You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "cgivre (via GitHub)" <gi...@apache.org> on 2026/09/08 14:40:29 UTC
[PR] Shard CI tests and raise the surefire fork count (drill)
cgivre opened a new pull request, #3079:
URL: https://github.com/apache/drill/pull/3079
## Description
The unit test suite dominates CI wall clock time, and `exec/java-exec` alone accounts for roughly half of it (~31 minutes across 577 classes).
This splits each matrix entry three ways by test class name and runs two surefire forks per job:
- **Sharding** — a `Select test shard` step maps `matrix.shard` to a `-Dtest=...` pattern list. Boundaries were picked from measured per-class times; the longest shard is about 11 minutes.
- **`-DforkCount=2`** — several of the slowest classes are wall-clock bound rather than CPU bound (`TestTimedCallable` sleeps for 105 seconds; the RPC, SSL and graceful-shutdown tests wait on timeouts), so a second fork overlaps that idle time cheaply. Raising it further needs memory headroom — the vector tests fail with `OutOfMemoryException` under pressure.
Two things worth calling out in review:
- The patterns are spelled out one prefix at a time because surefire does **not** support character-class globs. `-Dtest='Test[A-F]*'` silently matches nothing and the build passes green having run no tests, so only `*` wildcards and comma separated lists are used.
- The patterns are exhaustive over every test class in the repo, verified mechanically, so a newly added test always lands in a shard rather than being skipped without warning. Shard 3 repeats surefire's other default includes (`*Test`, `*Tests`, `*TestCase`) to pick up classes not named `Test*`. `TestFrameworkTest` matches shards 1 and 3 and runs twice — harmless, and far safer than a gap.
`-Dsurefire.failIfNoSpecifiedTests=false` is needed because most modules match no pattern in a given shard.
## Documentation
N/A — CI configuration only.
## Testing
CI on this PR is the test: all nine jobs (3 Java versions x 3 shards) must pass, and between them they run the same set of test classes as the previous single job.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MINOR UPDATE] Shard CI tests and raise the surefire fork count (drill)
Posted by "cgivre (via GitHub)" <gi...@apache.org>.
cgivre commented on code in PR #3079:
URL: https://github.com/apache/drill/pull/3079#discussion_r4343922478
##########
.github/workflows/ci.yml:
##########
@@ -57,9 +63,36 @@ jobs:
mkswap /tmp/swapfile
swapon /tmp/swapfile
"
+ # Which slice of the suite this job runs. The patterns are spelled out one prefix
+ # at a time because surefire does NOT support character-class globs:
+ # -Dtest='Test[A-F]*' silently matches nothing and the build passes green having
+ # run no tests. Only '*' wildcards and comma separated lists work, so each letter
+ # gets its own entry, in both cases (TestforBaseTestInheritance has a lowercase f).
+ #
+ # Shard 3 repeats surefire's other default includes (*Test, *Tests, *TestCase) to
+ # pick up classes not named Test*. Verified exhaustive against every test
+ # class in the repo. TestFrameworkTest matches shards 1 and 3 and runs twice —
+ # harmless, and far safer than a gap that skips tests without saying so.
+ - name: Select test shard
+ id: shard
+ run: |
+ case "${{ matrix.shard }}" in
+ 1) echo 'pattern=TestA*,Testa*,TestB*,Testb*,TestC*,Testc*,TestD*,Testd*,TestE*,Teste*,TestF*,Testf*' >> "$GITHUB_OUTPUT" ;;
+ 2) echo 'pattern=TestG*,Testg*,TestH*,Testh*,TestI*,Testi*,TestJ*,Testj*,TestK*,Testk*,TestL*,Testl*,TestM*,Testm*,TestN*,Testn*,TestO*,Testo*,TestP*,Testp*' >> "$GITHUB_OUTPUT" ;;
+ 3) echo 'pattern=TestQ*,Testq*,TestR*,Testr*,TestS*,Tests*,TestT*,Testt*,TestU*,Testu*,TestV*,Testv*,TestW*,Testw*,TestX*,Testx*,TestY*,Testy*,TestZ*,Testz*,*Test,*Tests,*TestCase,Test0*,Test1*,Test2*,Test3*,Test4*,Test5*,Test6*,Test7*,Test8*,Test9*,Test_*' >> "$GITHUB_OUTPUT" ;;
+ esac
Review Comment:
@shfshihuafeng
All tests passing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MINOR UPDATE] Shard CI tests and raise the surefire fork count (drill)
Posted by "shfshihuafeng (via GitHub)" <gi...@apache.org>.
shfshihuafeng commented on code in PR #3079:
URL: https://github.com/apache/drill/pull/3079#discussion_r4208050991
##########
.github/workflows/ci.yml:
##########
@@ -57,9 +63,36 @@ jobs:
mkswap /tmp/swapfile
swapon /tmp/swapfile
"
+ # Which slice of the suite this job runs. The patterns are spelled out one prefix
+ # at a time because surefire does NOT support character-class globs:
+ # -Dtest='Test[A-F]*' silently matches nothing and the build passes green having
+ # run no tests. Only '*' wildcards and comma separated lists work, so each letter
+ # gets its own entry, in both cases (TestforBaseTestInheritance has a lowercase f).
+ #
+ # Shard 3 repeats surefire's other default includes (*Test, *Tests, *TestCase) to
+ # pick up classes not named Test*. Verified exhaustive against every test
+ # class in the repo. TestFrameworkTest matches shards 1 and 3 and runs twice —
+ # harmless, and far safer than a gap that skips tests without saying so.
+ - name: Select test shard
+ id: shard
+ run: |
+ case "${{ matrix.shard }}" in
+ 1) echo 'pattern=TestA*,Testa*,TestB*,Testb*,TestC*,Testc*,TestD*,Testd*,TestE*,Teste*,TestF*,Testf*' >> "$GITHUB_OUTPUT" ;;
+ 2) echo 'pattern=TestG*,Testg*,TestH*,Testh*,TestI*,Testi*,TestJ*,Testj*,TestK*,Testk*,TestL*,Testl*,TestM*,Testm*,TestN*,Testn*,TestO*,Testo*,TestP*,Testp*' >> "$GITHUB_OUTPUT" ;;
+ 3) echo 'pattern=TestQ*,Testq*,TestR*,Testr*,TestS*,Tests*,TestT*,Testt*,TestU*,Testu*,TestV*,Testv*,TestW*,Testw*,TestX*,Testx*,TestY*,Testy*,TestZ*,Testz*,*Test,*Tests,*TestCase,Test0*,Test1*,Test2*,Test3*,Test4*,Test5*,Test6*,Test7*,Test8*,Test9*,Test_*' >> "$GITHUB_OUTPUT" ;;
+ esac
Review Comment:
Minor: Could you add a default branch to the bash case statement to fail fast on invalid shard values?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MINOR UPDATE] Shard CI tests and raise the surefire fork count (drill)
Posted by "cgivre (via GitHub)" <gi...@apache.org>.
cgivre merged PR #3079:
URL: https://github.com/apache/drill/pull/3079
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MINOR UPDATE] Shard CI tests and raise the surefire fork count (drill)
Posted by "cgivre (via GitHub)" <gi...@apache.org>.
cgivre commented on code in PR #3079:
URL: https://github.com/apache/drill/pull/3079#discussion_r4341561058
##########
.github/workflows/ci.yml:
##########
@@ -57,9 +63,36 @@ jobs:
mkswap /tmp/swapfile
swapon /tmp/swapfile
"
+ # Which slice of the suite this job runs. The patterns are spelled out one prefix
+ # at a time because surefire does NOT support character-class globs:
+ # -Dtest='Test[A-F]*' silently matches nothing and the build passes green having
+ # run no tests. Only '*' wildcards and comma separated lists work, so each letter
+ # gets its own entry, in both cases (TestforBaseTestInheritance has a lowercase f).
+ #
+ # Shard 3 repeats surefire's other default includes (*Test, *Tests, *TestCase) to
+ # pick up classes not named Test*. Verified exhaustive against every test
+ # class in the repo. TestFrameworkTest matches shards 1 and 3 and runs twice —
+ # harmless, and far safer than a gap that skips tests without saying so.
+ - name: Select test shard
+ id: shard
+ run: |
+ case "${{ matrix.shard }}" in
+ 1) echo 'pattern=TestA*,Testa*,TestB*,Testb*,TestC*,Testc*,TestD*,Testd*,TestE*,Teste*,TestF*,Testf*' >> "$GITHUB_OUTPUT" ;;
+ 2) echo 'pattern=TestG*,Testg*,TestH*,Testh*,TestI*,Testi*,TestJ*,Testj*,TestK*,Testk*,TestL*,Testl*,TestM*,Testm*,TestN*,Testn*,TestO*,Testo*,TestP*,Testp*' >> "$GITHUB_OUTPUT" ;;
+ 3) echo 'pattern=TestQ*,Testq*,TestR*,Testr*,TestS*,Tests*,TestT*,Testt*,TestU*,Testu*,TestV*,Testv*,TestW*,Testw*,TestX*,Testx*,TestY*,Testy*,TestZ*,Testz*,*Test,*Tests,*TestCase,Test0*,Test1*,Test2*,Test3*,Test4*,Test5*,Test6*,Test7*,Test8*,Test9*,Test_*' >> "$GITHUB_OUTPUT" ;;
+ esac
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org