Skip to content

Build Java SDK e2e example bundles natively in CI#69794

Draft
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:ci/java-sdk-e2e-native-toolchain
Draft

Build Java SDK e2e example bundles natively in CI#69794
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:ci/java-sdk-e2e-native-toolchain

Conversation

@jason810496

Copy link
Copy Markdown
Member

related:

Why

#69239 (java_sdk e2e mode) and #69411 (lang-SDK k8s test) solved the same cold-Gradle-build problem two different ways: containerized builds with a repo-local cache vs. host-toolchain builds with salted home-dir caches.

This converges the e2e java_sdk mode on the #69411 native-toolchain convention.

How

  • CI exports LANG_SDK_NATIVE_TOOLCHAIN=true (the same switch the k8s job uses) so the conftest invokes the host ./gradlew instead of docker run eclipse-temurin:17-jdk — the build helpers take a native flag mirroring the Speed up lang-SDK k8s test by building Go/Java natively in CI #69411 k8s helpers. This drops the per-run toolchain-image pull and the container workarounds (--network=host lock handover, HOME override). Local runs keep the containerized build, so a dev host still needs no JDK.
  • The JDK comes from actions/setup-java, versioned by the existing java-sdk-version build-info output, as k8s-tests.yml already does.
  • The Gradle cache moves to the default ~/.gradle with a salted key (e2e-java-sdk-gradle-v1-, bump to invalidate), kept separate from the k8s job's key since the e2e tree carries ~1GB of Spark the k8s job never needs.

Was generative AI tooling used to co-author this PR?

The java_sdk e2e mode and the lang-SDK k8s test solved the same
cold-build problem two different ways (containerized Gradle with a
repo-local cache vs host toolchain with salted home-dir caches), which
a review follow-up on apache#69239 asked to reconcile. Converge the e2e mode
on the apache#69411 native-toolchain convention: CI provisions the JDK with
actions/setup-java and caches ~/.gradle, dropping the per-run
eclipse-temurin image pull and the --network=host Gradle lock-handover
workaround; local runs keep the containerized build so a dev host
still needs no JDK.
@jason810496 jason810496 self-assigned this Jul 13, 2026
@jason810496 jason810496 removed the backport-to-v3-3-test Backport to v3-3-test label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant