-
Notifications
You must be signed in to change notification settings - Fork 209
[AURON #2017] [BUILD] Add Spark 4.x support to dev/reformat script. #2018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -52,12 +52,19 @@ fi | |||||||||||||||||||||||||||||||||
| sparkver=spark-3.5 | ||||||||||||||||||||||||||||||||||
| for celebornver in celeborn-0.5 celeborn-0.6 | ||||||||||||||||||||||||||||||||||
| do | ||||||||||||||||||||||||||||||||||
| run_maven -P"${sparkver}" -Pceleborn,"${celebornver}" -Puniffle,uniffle-0.10 -Ppaimon,paimon-1.2 -Pflink,flink-1.18 -Piceberg,iceberg-1.9 | ||||||||||||||||||||||||||||||||||
| run_maven -P"${sparkver}" -Pceleborn,"${celebornver}" -Puniffle,uniffle-0.10 -Ppaimon,paimon-1.2 -Pflink-1.18 -Piceberg-1.9 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| sparkvers=(spark-3.0 spark-3.1 spark-3.2 spark-3.3 spark-3.4) | ||||||||||||||||||||||||||||||||||
| sparkvers=(spark-3.0 spark-3.1 spark-3.2 spark-3.3 spark-3.4 spark-4.0 spark-4.1) | ||||||||||||||||||||||||||||||||||
| for sparkver in "${sparkvers[@]}" | ||||||||||||||||||||||||||||||||||
| do | ||||||||||||||||||||||||||||||||||
| if [[ $sparkver == spark-4.* ]]; then | ||||||||||||||||||||||||||||||||||
| SCALA_PROFILE=scala-2.13 | ||||||||||||||||||||||||||||||||||
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | |
| # Use JDK 21 for Spark 4.x to match the TPC-DS CI configuration | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 21) |
Copilot
AI
Feb 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command /usr/libexec/java_home is macOS-specific and will fail on Linux (ubuntu-24.04) where the CI runs. GitHub Actions' setup-java already sets JAVA_HOME automatically when multiple Java versions are installed, so this line may not be necessary. If explicit JAVA_HOME switching is needed, consider a cross-platform approach like checking if the command exists first, or relying on GitHub Actions' automatic JAVA_HOME management. See dev/mvn-build-helper/build-native.sh:35-44 for an example of how the codebase handles platform-specific logic with uname checks.
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | |
| else | |
| SCALA_PROFILE=scala-2.12 | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) | |
| if [[ "$(uname)" == "Darwin" ]] && [[ -x /usr/libexec/java_home ]]; then | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | |
| fi | |
| else | |
| SCALA_PROFILE=scala-2.12 | |
| if [[ "$(uname)" == "Darwin" ]] && [[ -x /usr/libexec/java_home ]]; then | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) | |
| fi |
Copilot
AI
Feb 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command /usr/libexec/java_home is macOS-specific and will fail on Linux (ubuntu-24.04) where the CI runs. GitHub Actions' setup-java already sets JAVA_HOME automatically when multiple Java versions are installed, so this line may not be necessary. If explicit JAVA_HOME switching is needed, consider a cross-platform approach like checking if the command exists first, or relying on GitHub Actions' automatic JAVA_HOME management. See dev/mvn-build-helper/build-native.sh:35-44 for an example of how the codebase handles platform-specific logic with uname checks.
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | |
| else | |
| SCALA_PROFILE=scala-2.12 | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) | |
| fi | |
| else | |
| SCALA_PROFILE=scala-2.12 | |
| fi | |
| if [[ "$(uname)" == "Darwin" ]] && command -v /usr/libexec/java_home >/dev/null 2>&1; then | |
| if [[ $sparkver == spark-4.* ]]; then | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | |
| else | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) | |
| fi | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JDK 17 setup is missing the cache configuration that JDK 8 has (cache: 'maven' on line 47). When using multiple setup-java actions, only the last one's cache is active. Consider consolidating both JDK setups into a single action using a matrix or ensuring cache is configured for the version that will be used most. Alternatively, if the reformat script needs to switch between JDKs, the cache configuration should be on the primary JDK version used.