-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add Spark 4.0.0 Build Profile and Other Supporting Changes [databricks] #10994
Changes from 49 commits
0c3a1ba
1631ab4
3271bfd
5d2b867
58806bd
540c732
5faecf8
5de0fff
bb784f0
140eb7b
41e1982
85a2f6d
f7f5a98
74dd568
bd1bc70
46eb751
2b15ab2
f7f8edf
ac0ecba
c644ce8
9d182b3
96e0843
b51c08b
1b9beb5
a173f35
6138cc8
1faabd4
0cf0036
a7b42c6
8d0f8ca
45b0d57
eb09f98
4407dbf
0e4e45a
bd10267
2982a59
319aefc
835fbb4
dfbb149
8ffc4f1
f599413
0544c6f
a43a68d
2cf7351
cabcda0
c19fccf
feeabfc
54a3ee4
48fe626
166e4c6
6cbce78
8d0351b
5b0e36d
66419b8
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 |
---|---|---|
|
@@ -40,10 +40,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
outputs: | ||
dailyCacheKey: ${{ steps.generateCacheKey.outputs.dailyCacheKey }} | ||
defaultSparkVersion: ${{ steps.allShimVersionsStep.outputs.defaultSparkVersion }} | ||
sparkTailVersions: ${{ steps.allShimVersionsStep.outputs.tailVersions }} | ||
sparkJDKVersions: ${{ steps.allShimVersionsStep.outputs.jdkVersions }} | ||
scala213Versions: ${{ steps.allShimVersionsStep.outputs.scala213Versions }} | ||
defaultSparkVersion: ${{ steps.all212ShimVersionsStep.outputs.defaultSparkVersion }} | ||
sparkTailVersions: ${{ steps.all212ShimVersionsStep.outputs.tailVersions }} | ||
sparkJDKVersions: ${{ steps.all212ShimVersionsStep.outputs.jdkVersions }} | ||
steps: | ||
- uses: actions/checkout@v4 # refs/pull/:prNumber/merge | ||
- uses: actions/setup-java@v4 | ||
|
@@ -69,7 +68,7 @@ jobs: | |
set -x | ||
max_retry=3; delay=30; i=1 | ||
while true; do | ||
for pom in pom.xml scala2.13/pom.xml | ||
for pom in pom.xml | ||
do | ||
mvn ${{ env.COMMON_MVN_FLAGS }} --file $pom help:evaluate -pl dist \ | ||
-Dexpression=included_buildvers \ | ||
|
@@ -89,7 +88,7 @@ jobs: | |
} | ||
done | ||
- name: all shim versions | ||
id: allShimVersionsStep | ||
id: all212ShimVersionsStep | ||
run: | | ||
set -x | ||
. jenkins/version-def.sh | ||
|
@@ -113,30 +112,12 @@ jobs: | |
jdkHeadVersionArrBody=$(printf ",{\"spark-version\":\"%s\",\"java-version\":8}" "${SPARK_BASE_SHIM_VERSION}") | ||
# jdk11 | ||
jdk11VersionArrBody=$(printf ",{\"spark-version\":\"%s\",\"java-version\":11}" "${SPARK_SHIM_VERSIONS_JDK11[@]}") | ||
# jdk17 | ||
jdk17VersionArrBody=$(printf ",{\"spark-version\":\"%s\",\"java-version\":17}" "${SPARK_SHIM_VERSIONS_JDK17[@]}") | ||
# jdk | ||
jdkVersionArrBody=$jdkHeadVersionArrBody$jdk11VersionArrBody$jdk17VersionArrBody | ||
jdkVersionArrBody=$jdkHeadVersionArrBody$jdk11VersionArrBody | ||
jdkVersionArrBody=${jdkVersionArrBody:1} | ||
jdkVersionJsonStr=$(printf {\"include\":[%s]} $jdkVersionArrBody) | ||
echo "jdkVersions=$jdkVersionJsonStr" >> $GITHUB_OUTPUT | ||
|
||
SCALA_BINARY_VER=2.13 | ||
. jenkins/version-def.sh | ||
svArrBodyNoSnapshot=$(printf ",{\"spark-version\":\"%s\",\"isSnapshot\":false}" "${SPARK_SHIM_VERSIONS_NOSNAPSHOTS[@]}") | ||
svArrBodyNoSnapshot=${svArrBodyNoSnapshot:1} | ||
# get private artifact version | ||
privateVer=$(mvn help:evaluate -q -pl dist -Dexpression=spark-rapids-private.version -DforceStdout) | ||
# do not add empty snapshot versions or when private version is released one (does not include snapshot shims) | ||
if [[ ${#SPARK_SHIM_VERSIONS_SNAPSHOTS_ONLY[@]} -gt 0 && $privateVer == *"-SNAPSHOT" ]]; then | ||
svArrBodySnapshot=$(printf ",{\"spark-version\":\"%s\",\"isSnapshot\":true}" "${SPARK_SHIM_VERSIONS_SNAPSHOTS_ONLY[@]}") | ||
svArrBodySnapshot=${svArrBodySnapshot:1} | ||
svJsonStr=$(printf {\"include\":[%s]} $svArrBodyNoSnapshot,$svArrBodySnapshot) | ||
else | ||
svJsonStr=$(printf {\"include\":[%s]} $svArrBodyNoSnapshot) | ||
fi | ||
|
||
echo "scala213Versions=$svJsonStr" >> $GITHUB_OUTPUT | ||
|
||
package-tests: | ||
needs: cache-dependencies | ||
|
@@ -187,27 +168,51 @@ jobs: | |
} | ||
done | ||
|
||
set-scala213-versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
scala213Versions: ${{ steps.all213ShimVersionsStep.outputs.scala213Versions }} | ||
sparkJDK17Versions: ${{ steps.all213ShimVersionsStep.outputs.jdkVersions }} | ||
steps: | ||
- uses: actions/checkout@v4 # refs/pull/:prNumber/merge | ||
|
||
- id: all213ShimVersionsStep | ||
run: | | ||
set -x | ||
SCALA_BINARY_VER=2.13 | ||
. jenkins/version-def.sh | ||
svArrBodyNoSnapshot=$(printf ",{\"spark-version\":\"%s\",\"isSnapshot\":false}" "${SPARK_SHIM_VERSIONS_NOSNAPSHOTS[@]}") | ||
svArrBodyNoSnapshot=${svArrBodyNoSnapshot:1} | ||
# get private artifact version | ||
privateVer=$(mvn help:evaluate -q -pl dist -Dexpression=spark-rapids-private.version -DforceStdout) | ||
svJsonStr=$(printf {\"include\":[%s]} $svArrBodyNoSnapshot) | ||
|
||
echo "scala213Versions=$svJsonStr" >> $GITHUB_OUTPUT | ||
|
||
# jdk17 | ||
jdk17VersionArrBody=$(printf ",{\"spark-version\":\"%s\",\"java-version\":17}" "${SPARK_SHIM_VERSIONS_JDK17_SCALA213[@]}") | ||
|
||
jdkVersionArrBody=$jdk17VersionArrBody | ||
jdkVersionArrBody=${jdkVersionArrBody:1} | ||
jdkVersionJsonStr=$(printf {\"include\":[%s]} $jdkVersionArrBody) | ||
echo "jdkVersions=$jdkVersionJsonStr" >> $GITHUB_OUTPUT | ||
|
||
package-tests-scala213: | ||
needs: cache-dependencies | ||
needs: set-scala213-versions | ||
continue-on-error: ${{ matrix.isSnapshot }} | ||
strategy: | ||
matrix: ${{ fromJSON(needs.cache-dependencies.outputs.scala213Versions) }} | ||
matrix: ${{ fromJSON(needs.set-scala213-versions.outputs.scala213Versions) }} | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 # refs/pull/:prNumber/merge | ||
|
||
- name: Setup Java and Maven Env | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 8 | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ needs.cache-dependencies.outputs.dailyCacheKey }} | ||
java-version: 17 | ||
|
||
- name: check runtime before tests | ||
run: | | ||
|
@@ -218,7 +223,7 @@ jobs: | |
run: | | ||
# https://github.com/NVIDIA/spark-rapids/issues/8847 | ||
# specify expected versions | ||
export JAVA_HOME=${JAVA_HOME_8_X64} | ||
export JAVA_HOME=${JAVA_HOME_17_X64} | ||
export PATH=${JAVA_HOME}/bin:${PATH} | ||
java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" | ||
# verify Scala 2.13 build files | ||
|
@@ -246,8 +251,57 @@ jobs: | |
} | ||
done | ||
|
||
verify-213-modules: | ||
needs: set-scala213-versions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: ${{ fromJSON(needs.set-scala213-versions.outputs.sparkJDK17Versions) }} | ||
steps: | ||
- uses: actions/checkout@v4 # refs/pull/:prNumber/merge | ||
|
||
- name: Setup Java and Maven Env | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
|
||
- name: check runtime before tests | ||
run: | | ||
env | grep JAVA | ||
java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" | ||
|
||
- name: Build JDK | ||
run: | | ||
# https://github.com/NVIDIA/spark-rapids/issues/8847 | ||
# specify expected versions | ||
export JAVA_HOME=${JAVA_HOME_${{ matrix.java-version }}_X64} | ||
export PATH=${JAVA_HOME}/bin:${PATH} | ||
java -version && mvn --version && echo "ENV JAVA_HOME: $JAVA_HOME, PATH: $PATH" | ||
# verify Scala 2.13 build files | ||
./build/make-scala-version-build-files.sh 2.13 | ||
# verify git status | ||
if [ -n "$(echo -n $(git status -s | grep 'scala2.13'))" ]; then | ||
git add -N scala2.13/* && git diff 'scala2.13/*' | ||
echo "Generated Scala 2.13 build files don't match what's in repository" | ||
exit 1 | ||
fi | ||
razajafri marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# change to Scala 2.13 Directory | ||
cd scala2.13 | ||
# test command, will retry for 3 times if failed. | ||
max_retry=3; delay=30; i=1 | ||
while true; do | ||
mvn verify \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/NVIDIA/spark-rapids/actions/runs/9811144386/job/27146029550 this is still building against scala 2.12. please switch to scala2.13 folder before the mvn command https://github.com/NVIDIA/spark-rapids/blob/branch-24.08/.github/workflows/mvn-verify-check.yml#L232-L233 |
||
-P "individual,pre-merge" -Dbuildver=${{ matrix.spark-version }} \ | ||
${{ env.COMMON_MVN_FLAGS }} && break || { | ||
if [[ $i -le $max_retry ]]; then | ||
echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) | ||
else | ||
echo "mvn command failed. Exit 1"; exit 1 | ||
fi | ||
} | ||
done | ||
|
||
verify-all-modules: | ||
verify-all-212-modules: | ||
needs: cache-dependencies | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
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.
We need an issue how to better handle cache for scala2.13 build dependencies
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.
#11199