Skip to content

Java SDK: Increase Gradle daemon heap to fix OOM when building from source#792

Merged
mjameswh merged 6 commits intomainfrom
java-pr-2814-fails-features-test
Mar 31, 2026
Merged

Java SDK: Increase Gradle daemon heap to fix OOM when building from source#792
mjameswh merged 6 commits intomainfrom
java-pr-2814-fails-features-test

Conversation

@mjameswh
Copy link
Copy Markdown
Contributor

@mjameswh mjameswh commented Mar 31, 2026

Summary

  • Adds gradle.properties to set org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
  • Without this, the Gradle daemon uses its default 512 MB heap, which is insufficient when building the Java SDK from source via a composite includeBuild
  • Triggered by Update Temporal Cloud-API to v0.12.0 sdk-java#2814, which adds more protobuf definitions and pushes compilation of temporal-serviceclient past the default heap limit on the ubuntu-latest runner
  • Also, bump Java to 23.

Context

When the Java features test runs with version-is-repo-ref: true, sdkbuild/java.go uses Gradle's includeBuild to composite-build the full sdk-java repo. The gradlew invoked is the one from the features repo root, so this gradle.properties controls the daemon heap for the entire build (including the included sdk-java subproject).

The sdk-java repo's own CI doesn't hit this because it uses ubuntu-latest-16-cores runners and gradle/actions/setup-gradle@v5 caching, whereas the features workflow starts a fresh daemon on ubuntu-latest with no memory configuration.

🤖 Generated with Claude Code

…urce

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mjameswh mjameswh requested review from a team as code owners March 31, 2026 14:03
@mjameswh mjameswh changed the title Increase Gradle daemon heap to fix OOM when building Java SDK from source Java SDK: Increase Gradle daemon heap to fix OOM when building from source Mar 31, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mjameswh mjameswh enabled auto-merge (squash) March 31, 2026 14:58
@mjameswh mjameswh merged commit 757294c into main Mar 31, 2026
25 checks passed
@mjameswh mjameswh deleted the java-pr-2814-fails-features-test branch March 31, 2026 15:01
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