Commit 4d76783
authored
fix: bump metaspace limits in release Gradle config (#30093)
## **Description**
Fixes Gradle daemon OOM crashes in release Android builds caused by
insufficient metaspace. The [RN 0.81.5 upgrade increased
metaspace](https://github.com/MetaMask/metamask-mobile/pull/29195/changes#diff-76cfa064ed35a9fdb156b8a6d74a9ad14983bf6f859c41a27ca8a4b7a32b17d7R4)
in `gradle.properties.github` (E2E) but `gradle.properties.release`
(production) was created before that fix and still had the old 512m
limit.
Changes:
- `MaxMetaspaceSize` 512m -> 2g (Gradle daemon JVM args)
- Add `MaxMetaspaceSize=1g` to `kotlin.daemon.jvmargs`
Evidence: [build job
75442162274](https://github.com/MetaMask/metamask-mobile/actions/runs/25695060995/job/75442162274)
had 2 daemon crashes with `The Daemon will expire after the build after
running out of JVM Metaspace` at 512m. E2E builds with 2g metaspace have
0 crashes.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: MCWP-574
## **Manual testing steps**
```gherkin
Feature: Android release build stability
Scenario: Build completes without daemon crashes
Given a Build Mobile App workflow run on a branch with this fix
When the Android build job completes
Then the logs show 0 "daemon has disappeared" messages
And the "Build android" step duration is ~20min (vs ~22min with crashes)
```
## **Screenshots/Recordings**
N/A - CI config change
### **Before**
### **After**
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.1 parent 34ffb5c commit 4d76783
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments