Skip to content

Build Java SDK e2e example bundles natively in CI#69794

Merged
jason810496 merged 1 commit into
apache:mainfrom
jason810496:ci/java-sdk-e2e-native-toolchain
Jul 15, 2026
Merged

Build Java SDK e2e example bundles natively in CI#69794
jason810496 merged 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?

@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
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 force-pushed the ci/java-sdk-e2e-native-toolchain branch from 3c1c55f to 2567b79 Compare July 15, 2026 06:17
@jason810496
jason810496 marked this pull request as ready for review July 15, 2026 06:18

@uranusjr uranusjr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@jason810496
jason810496 merged commit 50f90d1 into apache:main Jul 15, 2026
183 of 213 checks passed
joshuabvarghese pushed a commit to joshuabvarghese/airflow that referenced this pull request Jul 16, 2026
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.
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.

3 participants