SAMZA-1885: Enable parallel task execution for build#1504
Merged
prateekm merged 1 commit intoapache:masterfrom Jun 15, 2021
Merged
SAMZA-1885: Enable parallel task execution for build#1504prateekm merged 1 commit intoapache:masterfrom
prateekm merged 1 commit intoapache:masterfrom
Conversation
prateekm
approved these changes
Jun 15, 2021
Contributor
prateekm
left a comment
There was a problem hiding this comment.
This is great, thanks for fixing this!
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.
Symptom: Parallel builds did not work, so we had it disabled, which slowed down build time.
Cause: There was a cryptic
NullPointerExceptionwhich sometimes had no additional context and sometimes showed a stack trace for a "progress tracking" flow in Gradle. It looks like this issue was related to the usage oflogging.setLevelinbuild.gradle. Removinglogging.setLevelcauses theNullPointerExceptionto go away. Thislogging.setLevelhas been deprecated since Gradle 2 (https://docs.gradle.org/2.14/release-notes.html), and it doesn't look like it makes any difference in logging anymore anyways. I didn't dig further into Gradle to see exactly whylogging.setLevelwas causing the issue, but my guess is that there is some race condition that is triggered when turning on parallel builds, and that deprecated flow just hasn't been maintained to work with parallel builds since it has been deprecated for so long.Changes:
logging.setLevelusage.Tests:
./gradlew build
Impact: Reduces build times by about 2-3 minutes. It doesn't speed up the time it takes to run the tests though, and the tests are still taking up a significant amount of time.