Enable parallel Maven reactor builds in CI - #1665
Merged
tomazfernandes merged 1 commit intoAug 8, 2026
Merged
Conversation
Run the CI verify with -T 1C so independent modules build concurrently. The reactor currently runs ~15 min sequentially while the test suites are wait-bound, not CPU-bound; building modules in parallel cuts wall-clock to roughly the longest dependency chain.
tomazfernandes
requested review from
MatejNedic and
maciejwalkowiak
as code owners
August 2, 2026 14:42
Contributor
Author
|
@maciejwalkowiak @MatejNedic, this effectively reduces build time from the current 15 minutes to 9 minutes. I have a few other adjustments with the goal of bringing the total build time to ~5 minutes or less of total run time. Then I'll suggest we make having a passing build mandatory for merging PRs, to avoid the possibility of having a broken main build such as described in #1662. Let me know if you have any thoughts or concerns, otherwise I'll merge this PR and it's a simple revert if anything unexpected happens. |
Contributor
Author
|
Merging as aligned internally. |
tomazfernandes
added a commit
that referenced
this pull request
Aug 8, 2026
Run the CI verify with -T 1C so independent modules build concurrently. The reactor currently runs ~15 min sequentially while the test suites are wait-bound, not CPU-bound; building modules in parallel cuts wall-clock to roughly the longest dependency chain, currently at ~9 minutes. (cherry picked from commit 4aac178)
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.
Motivation
A full
verifyon CI currently takes ~15 minutes running the 49-module reactor sequentially, while the heavy modules (Kinesis, SQS, SNS, Autoconfigure) spend most of that time waiting on LocalStack interactions rather than using CPU. Five modules account for ~12 of those minutes, and they have no dependency on each other.Change
Add
-T 1Cto the Maven invocations in thebuildandsonarjobs, so independent modules build concurrently (one thread per core; the module remains the unit of parallelism: nothing changes within a module's lifecycle). Wall-clock drops to roughly the longest dependency chain in the reactor instead of the sum of all modules.Validation
clean verify -Pspringcompared sequential vs-T 1Clocally: ~2.4× faster wall-clock.@{argLine}resolves per surefire fork), and thesonargoal runs once at the end of the reactor, so the coverage pipeline is unaffected by build threading.Notes
-Twith Maven 3.x, which makes CI failure logs a bit harder to scan. Properly buffered per-module output needs Maven 4.