[worker] warn on invalid resource class config when setting GRADLE_OPTS#3660
[worker] warn on invalid resource class config when setting GRADLE_OPTS#3660
GRADLE_OPTS#3660Conversation
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3660 +/- ##
==========================================
- Coverage 55.97% 55.96% -0.00%
==========================================
Files 866 866
Lines 37312 37320 +8
Branches 7759 7761 +2
==========================================
+ Hits 20882 20883 +1
- Misses 16334 16339 +5
- Partials 96 98 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Subscribed to pull request
Generated by CodeMention |
GRADLE_OPTS
sjchmiela
left a comment
There was a problem hiding this comment.
Sssso resource classes is an outdated concept, or a concept we're trying to move away from. For instance, workflow-orchestration has never and will never provide the resourceClass in config.
Maybe we want to instead of relying on resource class, execute some command to learn the free memory on the instance and adjust GRADLE_OPTS from there?
Why
This issue expo/expo#45213 is reporting that the max heap size in Gradle options is set to an incorrect value when the resource class is
large(should be-Xmx8g, is-Xmx4g).I suspect the worker is receiving an empty or incorrect
resourceClassconfig value, as we silently fallback to4gin such cases. This PR adds Sentry reporting to enable us to easily track such cases. Reporting is turned off inEnvironment.TEST.How
Report a sentry warning on:
config.resourceClasssetconfig.resourceClassThe reporting is plugged just before determining the Gradle options
getBuildEnvinpackages/worker/src/env.ts.Test Plan
CI passes.