-
Notifications
You must be signed in to change notification settings - Fork 240
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
Deploy release candidates to local maven repo for dependency check[skip ci] #10201
Conversation
To fix : NVIDIA#10164 Deploy release candidates to local maven repo leveraging the release deploy script. Instead of using internal snapshots maven repo(having all the intermediate artifacts), we check dependencies for the release candidates using the local maven repo, which only contains release candidates. Signed-off-by: Tim Liu <[email protected]>
CLASSLIST="$CLASSIFIERS,sources,javadoc" | ||
CLASSLIST=(${CLASSLIST//','/' '}) | ||
for class in ${CLASSLIST[@]}; do | ||
echo "$ART_GROUP_ID:$ART_ID:$ART_VER:jar:$class" >> $ARTIFACT_FILE |
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 artifact file is like below, and our plugin nightly build CI will check all these artifacts dependencies.
com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark-jdk-profiles_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda11
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:sources
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:javadoc
PARENT_ART_ID=$(mvnEval "./" project.artifactId) | ||
echo "$ART_GROUP_ID:$PARENT_ART_ID:$ART_VER:pom" >> $ARTIFACT_FILE | ||
|
||
###### Deploy the jdk-profile pom file ###### |
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.
Deploy pom.xml file of the module jdk-profiles
here, to PASS the release artifact's dependency check
@@ -30,7 +30,7 @@ WORKSPACE=${WORKSPACE:-$(pwd)} | |||
export M2DIR=${M2DIR:-"$WORKSPACE/.m2"} | |||
|
|||
## MVN_OPT : maven options environment, e.g. MVN_OPT='-Dspark-rapids-jni.version=xxx' to specify spark-rapids-jni dependency's version. | |||
MVN="mvn -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 ${MVN_OPT}" | |||
MVN="mvn -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 ${MVN_OPT} -Psource-javadoc" |
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.
sources.jar
and javadoc.jar
files are required by OSS release
Generate these 2 files to mimic OSS release in our nightly build CI
After this change get merged, we'll enable the release candidates dependency checking in our nightly Build CI job @gerashegalov @jlowe Can you help review? Thanks! |
Signed-off-by: Tim Liu <[email protected]>
|
||
set -ex | ||
|
||
ARTIFACT_FILE=${1:-"/tmp/artifacts-list"} |
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.
artifact list file created by deploy.sh, e.g.,
com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark-jdk-profiles_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda11
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:sources
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:javadoc
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.
should
com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark-jdk-profiles_2.12:24.02.0-SNAPSHOT:pom
be in this list?
When we do the test with mvn dependency:get
for the documented artifacts such as com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda11
and one of the pom-type artifacts above is missing we should see a failure anyways, correct?
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.
@gerashegalov Yes, you're right, jar's dependency contain the pom files!
My original thought was to check anything we deployed, though pom check would be duplicated.
Let me remove pom from the check list.
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.
Updated, artifact list will be like
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda11
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda12
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:sources
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:javadoc
similar list for scala-2.13 jars, and for arm64 jars
jenkins/deploy.sh
Outdated
@@ -96,6 +102,14 @@ echo "Deploy CMD: $DEPLOY_CMD" | |||
|
|||
###### Deploy the parent pom file ###### | |||
$DEPLOY_CMD -Dfile=./pom.xml -DpomFile=./pom.xml | |||
PARENT_ART_ID=$(mvnEval "./" project.artifactId) | |||
echo "$ART_GROUP_ID:$PARENT_ART_ID:$ART_VER:pom" >> $ARTIFACT_FILE |
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.
save artifact like com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom
into $ARTIFACT_FILE
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.
To elaborate on the previous comment, we don't have to register intermediate pom for an explicit check via an $ARTIFACT_FILE line.
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.
Updated
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.
Looks good already, just need to double-check if the test fails if we omit deploy-file of jdk-profiles
|
||
set -ex | ||
|
||
ARTIFACT_FILE=${1:-"/tmp/artifacts-list"} |
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.
should
com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark-jdk-profiles_2.12:24.02.0-SNAPSHOT:pom
be in this list?
When we do the test with mvn dependency:get
for the documented artifacts such as com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda11
and one of the pom-type artifacts above is missing we should see a failure anyways, correct?
jenkins/deploy.sh
Outdated
@@ -96,6 +102,14 @@ echo "Deploy CMD: $DEPLOY_CMD" | |||
|
|||
###### Deploy the parent pom file ###### | |||
$DEPLOY_CMD -Dfile=./pom.xml -DpomFile=./pom.xml | |||
PARENT_ART_ID=$(mvnEval "./" project.artifactId) | |||
echo "$ART_GROUP_ID:$PARENT_ART_ID:$ART_VER:pom" >> $ARTIFACT_FILE |
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.
To elaborate on the previous comment, we don't have to register intermediate pom for an explicit check via an $ARTIFACT_FILE line.
Signed-off-by: Tim Liu <[email protected]>
Signed-off-by: Tim Liu <[email protected]>
I ran the |
build |
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.
LGTM
Is there a reason not to call dependency-check.sh from spark-nightly-build.sh so we do not have to guess how these two scripts are related? Are you going to add the Jenkins pipeline step for it in this repo?
Yes, I will add the dependency check into the Jenkins pipeline into another stage(dependency check). The reason why not calling from
|
build |
I'll enable the dependency check in our internal nightly build CI, it will run in tonight's plugin nightly job @gerashegalov @sameerz |
fi | ||
while read line; do | ||
artifact=$line # artifact=groupId:artifactId:version:[[packaging]:classifier] | ||
mvn dependency:get -DremoteRepositories=$remote_maven_repo -Dmaven.repo.local=$M2_CACHE -Dartifact=$artifact |
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.
Missed in the original review: we should rm -r $M2_CACHE/com/nvidia
before this line or even the whole $M2_CACHE
to avoid side-effect of previous dependency:get
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.
Good catch, filed a follow-up PR for it #10278
Follow up of NVIDIA#10201 (comment) Signed-off-by: Tim Liu <[email protected]>
…10278) Follow up of #10201 (comment) Signed-off-by: Tim Liu <[email protected]>
Deploy release candidates to local maven repo for dependency check
To fix : #10164
Deploy release candidates to local maven repo leveraging the release deploy script.
Instead of using internal snapshots maven repo(having all the intermediate artifacts),
we check dependencies for the release candidates using the local maven repo,
which only contains release candidates.
Signed-off-by: Tim Liu [email protected]