Skip to content

fix: Give the APK build more memory and report failures on this fork - #2

Merged
fabiocatalao merged 1 commit into
mainfrom
ccr-9700e055-itslra
Oct 2, 2026
Merged

fabiocatalao merged 1 commit into
mainfrom
ccr-9700e055-itslra

Conversation

@fabiocatalao

Copy link
Copy Markdown
Owner

Fixes the two problems behind the failed first Fork sync run on main (run 36974915823).

The APK build ran out of memory

:app:packageStandardRelease failed with java.lang.OutOfMemoryError: Java heap space in zipflinger, the code that writes the APK. The project's gradle.properties gives Gradle a 4 GB heap. That was barely enough for the earlier unsigned PR builds (one of four failed the same way), and not enough once the ~190 MB APK is also signed.

The workflow now overrides org.gradle.jvmargs on the command line with a 6 GB heap and the same 4 GB for Kotlin's daemon. The runner has 16 GB, and about 5 GB was still available when the build failed. Upstream's gradle.properties isn't touched, so this can't conflict on sync. I checked locally that a command-line -Dorg.gradle.jvmargs overrides the project file.

The failure issue was never opened

sync.sh adds an upstream remote, and the GitHub CLI picks it over origin when choosing which repository to act on. So every gh command in the workflow (issues, labels and releases) targeted Infomaniak's repository. In the failed run, gh issue create stopped at "could not add label: 'fork-sync' not found". The workflow's token can't write to their repository, so nothing was posted there.

The workflow now sets GH_REPO to this repository. I reproduced the difference with gh api 'repos/{owner}/{repo}' in a clone that has both remotes: without GH_REPO it resolves to Infomaniak/android-kDrive, and with it to fabiocatalao/android-kDrive. report.sh also stops hiding errors from label creation, and uses --force so an existing label isn't reported as an error.

Testing

  • actionlint (with shellcheck) and shellcheck pass.
  • This PR's Build job runs with the signing secrets, so it exercises the signed packaging that ran out of memory.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM


Generated by Claude Code

The first sync on main failed twice over:

- :app:packageStandardRelease ran out of memory (java.lang.OutOfMemoryError:
  Java heap space in zipflinger). The project's 4 GB Gradle heap was just
  enough for unsigned builds, but packaging and signing the ~190 MB APK
  needs more. Override org.gradle.jvmargs in CI with a 6 GB heap; the
  runner has 16 GB and had about 5 GB available when the build failed.
- The failure issue was never opened. sync.sh adds an "upstream" remote,
  and gh prefers it over origin, so every gh command (issues, labels and
  releases) targeted Infomaniak's repository. Set GH_REPO to this
  repository, and stop hiding errors from label creation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM
@fabiocatalao
fabiocatalao marked this pull request as ready for review October 2, 2026 07:05
@fabiocatalao
fabiocatalao merged commit f0b6cf8 into main Oct 2, 2026
2 checks passed
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