Reset Gradle oom score before launch#3898
Draft
sjchmiela wants to merge 1 commit into
Draft
Conversation
7352b4f to
0d70011
Compare
66cbf1b to
6664fc5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stanley/gradle-launch-exec #3898 +/- ##
==============================================================
+ Coverage 59.03% 59.06% +0.04%
==============================================================
Files 937 936 -1
Lines 40937 40906 -31
Branches 8622 8623 +1
==============================================================
- Hits 24163 24159 -4
+ Misses 16678 16651 -27
Partials 96 96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0d70011 to
f15ecd7
Compare
6664fc5 to
71bce04
Compare
|
❌ It looks like a changelog entry is missing for this PR. Add it manually to CHANGELOG.md. |
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.
Summary
Replace the delayed Gradle descendant
oom_score_adjscan with an immediate shell-level reset before launching Gradle.The worker service is protected with
OOMScoreAdjust=-999, so Gradle inherits that value unless we reset it. This changes the Gradle launch wrapper to write0to/proc/$$/oom_score_adjbeforeexec ./gradlew ..., which makes Gradle and its child processes inherit the default OOM score instead of the worker's protected score.This PR is stacked on #3897.
Validation
yarn --cwd packages/build-tools typecheckyarn oxfmt --check packages/build-tools/src/android/gradle.ts packages/build-tools/src/steps/utils/android/gradle.tsyarn oxlint --type-aware --import-plugin --tsconfig ./tsconfig.oxlint.json packages/build-tools/src/android/gradle.ts packages/build-tools/src/steps/utils/android/gradle.ts