Skip to content

SAMZA-1885: Enable parallel task execution for build#1504

Merged
prateekm merged 1 commit intoapache:masterfrom
cameronlee314:parallel
Jun 15, 2021
Merged

SAMZA-1885: Enable parallel task execution for build#1504
prateekm merged 1 commit intoapache:masterfrom
cameronlee314:parallel

Conversation

@cameronlee314
Copy link
Contributor

Symptom: Parallel builds did not work, so we had it disabled, which slowed down build time.

Cause: There was a cryptic NullPointerException which 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 of logging.setLevel in build.gradle. Removing logging.setLevel causes the NullPointerException to go away. This logging.setLevel has 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 why logging.setLevel was 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:

  1. Remove logging.setLevel usage.
  2. Enable parallel task execution.

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.

Copy link
Contributor

@prateekm prateekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks for fixing this!

@prateekm prateekm merged commit 1f0f8bd into apache:master Jun 15, 2021
@cameronlee314 cameronlee314 deleted the parallel branch November 17, 2021 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments