Skip to content

[SPARK-55115][INFRA] Auto-detect Java version in release scripts - #53892

Closed
cloud-fan wants to merge 1 commit into
apache:branch-3.5from
cloud-fan:update-release-infra-branch-3.5
Closed

[SPARK-55115][INFRA] Auto-detect Java version in release scripts#53892
cloud-fan wants to merge 1 commit into
apache:branch-3.5from
cloud-fan:update-release-infra-branch-3.5

Conversation

@cloud-fan

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Updated the init_java function in release-util.sh to auto-detect and set the appropriate Java version based on the Spark version being built:

  • Spark < 4.0: Uses Java 8
  • Spark >= 4.0: Uses Java 17

Why are the changes needed?

This allows a single Docker image (with multiple Java versions installed) to build all Spark versions. Combined with updates to the master branch's Dockerfile to install both Java 8 and 17, this eliminates the need to maintain separate Dockerfiles for each branch.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manual testing by building releases with the updated scripts.

Was this patch authored or co-authored using generative AI tooling?

Yes. cursor 2.3.41

### What changes were proposed in this pull request?
Updated the `init_java` function in `release-util.sh` to auto-detect and set the appropriate Java version based on the Spark version being built:
- Spark < 4.0: Uses Java 8
- Spark >= 4.0: Uses Java 17
### Why are the changes needed?
This allows a single Docker image (with multiple Java versions installed) to build all Spark versions. Combined with updates to the master branch's Dockerfile to install both Java 8 and 17, this eliminates the need to maintain separate Dockerfiles for each branch.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Manual testing by building releases with the updated scripts.
### Was this patch authored or co-authored using generative AI tooling?
Yes.
@cloud-fan
cloud-fan marked this pull request as draft January 21, 2026 18:40
@github-actions

Copy link
Copy Markdown

JIRA Issue Information

=== Improvement SPARK-55115 ===
Summary: Use master branch's Dockerfile for release builds
Assignee: None
Status: Open
Affected: ["4.2.0"]


This comment was automatically generated by GitHub Actions

@cloud-fan

Copy link
Copy Markdown
ContributorAuthor

This only fixes java version but not python version, switching to #53905

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@cloud-fan@HyukjinKwon