MINOR: Update JDK fetch logic for version 25 and improve path handling#21394
Draft
tirthooo7 wants to merge 4 commits intoapache:trunkfrom
Draft
MINOR: Update JDK fetch logic for version 25 and improve path handling#21394tirthooo7 wants to merge 4 commits intoapache:trunkfrom
tirthooo7 wants to merge 4 commits intoapache:trunkfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes bugs where
--jdk-versionand--jdk-archparameters were ignored, and refactors Vagrant provisioning (vagrant/base.sh) to support flexible JDK versions without code changes.Bug Fixes
This PR fixes two bugs documented in JDK Version and Architecture Flow:
--jdk-versionignoredJDK_FULLwas hardcoded to17-linux-x64, so passing--jdk-version 25still downloaded JDK 17JDK_VERSION--jdk-archignoredJDK_ARCH(e.g.,x64,aarch64)Before (Broken)
After (Fixed)
Background
The Kafka system tests (System-test-Kafka-Branch-Builder and Scheduler-Trunk Nightly) provision EC2 worker nodes via Terraform, which use
vagrant/base.shto set up the test environment.Changes
vagrant/base.shkafka-packages/jdk/jdk-{VERSION}-linux-{ARCH}.tar.gzJDK_VERSIONvariable following Oracle Runtime.Version naming. Supports:17,25.0.2,8u202, etc.JDK_ARCHnow correctly used in download URL (x64oraarch64)JDK_MAJORifJDK_VERSIONis not setJDK_MAJORis derived fromJDK_VERSIONfor install directory namingJDK_VERSIONformatvagrant/aws-packer.jsonJDK_MAJORtoJDK_VERSIONto pass full version string tobase.sh.gitignore.claude/directoryBenefits
--jdk-versionignored--jdk-archignored25.0.2)Adding New JDK Versions
No code changes required. To add support for a new JDK version:
Upload JDK to S3: Follow Uploading JDK to kafka-packages S3 Bucket
jdk-{VERSION}-linux-{ARCH}.tar.gzs3://kafka-packages/jdk/Run tests: Trigger System-test-Kafka-Branch-Builder with
JDK_VERSION={new-version}Usage
JDK_VERSION=17jdk/jdk-17-linux-x64.tar.gzJDK_VERSION=25.0.2jdk/jdk-25.0.2-linux-x64.tar.gzJDK_VERSION=21.0.1jdk/jdk-21.0.1-linux-x64.tar.gzTesting
In apache:trunk, system tests are supported only via Vagrant. However, due to a recent change in the tagging policy, branch-builder tests using Vagrant can no longer be run (see failure here).
To validate these changes, I created an equivalent PR in the Confluent repo: confluentinc#1888, based on https://github.com/confluentinc/kafka/tree/master, which includes Terraform support. I validated the changes using Terraform-based system tests there (refer to the Testing section in the PR description).
Related Links