Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: run java process from no-isolated workers #429

Merged
merged 7 commits into from
Mar 8, 2021
Merged

Conversation

KengoTODA
Copy link
Member

@KengoTODA KengoTODA commented Feb 16, 2021

To fix #416, run the java process as not Gradle worker but as an isolated process.
To avoid making the build process blocked, we run the process in a worker. From Gradle 6.0, we can inject ExecOperations to the WorkAction instance so we can run a process in a worker thread (it was impossible because the worker cannot access a Project instance that provides #javaexec() method).

This feature needs one consideration: If we launch a process by ExecOperations#javaexec(), we cannot touch its stdout and stderr. So in case of failure, it could be difficult to identify the root cause. For now, I found no way to handle it, so I want to release this feature as disabled-by-default. After we confirmed that this feature really solves the issue, I will enable this feature by default.

To reviewer:
Please squash-and-merge this PR with a commit message that has feat: prefix, then it will release a minor update.

From Gradle 6.0, we can inject `ExecOperations` to `WorkAction` instance
so we can run java process in worker thread.

refs #416
@KengoTODA KengoTODA self-assigned this Feb 16, 2021
@KengoTODA
Copy link
Member Author

#430 will fix the broken build. See https://github.blog/changelog/2021-01-21-github-actions-short-sha-deprecation/ for detail.

@KengoTODA KengoTODA marked this pull request as ready for review February 18, 2021 22:30
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@KengoTODA KengoTODA requested a review from a team March 4, 2021 03:06
@KengoTODA KengoTODA merged commit 6c09f31 into master Mar 8, 2021
@KengoTODA KengoTODA deleted the issue-416 branch March 8, 2021 00:58
@github-actions
Copy link

github-actions bot commented Mar 8, 2021

🎉 This PR is included in version 4.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

KengoTODA added a commit that referenced this pull request Sep 26, 2021
make changes from #429 enable by default

BREAKING CHANGE: Each SpotBugsTask will launch a `java` process by default.
It may affect build performance but is necessary to fix the resource leak
reported as #416.
KengoTODA added a commit that referenced this pull request Oct 7, 2021
make changes from #429 enable by default

BREAKING CHANGE: Each SpotBugsTask will launch a `java` process by default.
It may affect build performance but is necessary to fix the resource leak
reported as #416.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect keepAliveMode used for Gradle worker daemon
2 participants