-
Notifications
You must be signed in to change notification settings - Fork 230
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
Get cudf/spark dependency from the correct .m2 dir #1062
Conversation
'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com>
build |
The changes look good, but it doesn't completely fix the issue. If the script fails to run successfully for some reason then it will still not fail the build. I would like to see changes related to error handling in addition to fixing the paths when run outside of Jenkins. The improved error handling doesn't have to be part of this PR, but we shouldn't close #1031 until that is addressed. |
@jlowe @revans2, I agree if the script fails again later, then we'll stop the build. I tried to add some scripts to check how to let As the I did not find a good way to let Have you any suggestions? mvn process: |
The subprocess is launched by the Maven antrun plugin which in turn is using Ant to perform the tasks. In this case it's the Ant That's the first step. The next step is to ensure the script will fail if anything launched by the script fails. That can be done by placing a |
@jlowe I tried the way you suggested, the |
@@ -23,6 +23,7 @@ | |||
# SPARK_VER - The version of spark | |||
|
|||
# Parse cudf and spark dependency versions | |||
set -e |
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 same needs to happen in build/build-info
and the corresponding failonerror
pom change is needed in the top-level pom's use of the antrun plugin.
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 same needs to happen in
build/build-info
and the correspondingfailonerror
pom change is needed in the top-level pom's use of the antrun plugin.
@jlowe Thanks very much for reminding me, 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.
Needs 2020 copyrights on build/build-info
Signed-off-by: Tim Liu <timl@nvidia.com>
build |
1 similar comment
build |
build/build-info
Outdated
@@ -1,7 +1,7 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# | |||
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | |||
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. |
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.
This needs to be 2019-2020. We don't give up copyright for older years.
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.
This needs to be 2019-2020. We don't give up copyright for older years.
Ok
build |
Signed-off-by: Tim Liu <timl@nvidia.com>
757724a
to
e143254
Compare
build |
1 similar comment
build |
This reverts commit 0afbca6. Signed-off-by: Jason Lowe <jlowe@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir (#1062) * Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com> * List the latest SNAPSHOT jar file in local maven repo Signed-off-by: Tim Liu <timl@nvidia.com> * Get the path of 'dependency-info.sh', then set 'WORKSPACE' relative to it Signed-off-by: Tim Liu <timl@nvidia.com> * Only collect dependency info on Jenkins build * Only collect timestamped dependency in Jenkins build Collect snapshot dependency info only in Jenkins build, In dev build, print 'SNAPSHOT' tag without time stamp, e.g.: cudf-0.17-SNAPSHOT.jar * simplifying the dependencylogic
* Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com>
…)" (NVIDIA#1083) This reverts commit 0afbca6. Signed-off-by: Jason Lowe <jlowe@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir (NVIDIA#1062) * Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com> * List the latest SNAPSHOT jar file in local maven repo Signed-off-by: Tim Liu <timl@nvidia.com> * Get the path of 'dependency-info.sh', then set 'WORKSPACE' relative to it Signed-off-by: Tim Liu <timl@nvidia.com> * Only collect dependency info on Jenkins build * Only collect timestamped dependency in Jenkins build Collect snapshot dependency info only in Jenkins build, In dev build, print 'SNAPSHOT' tag without time stamp, e.g.: cudf-0.17-SNAPSHOT.jar * simplifying the dependencylogic
* Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com>
…)" (NVIDIA#1083) This reverts commit 0afbca6. Signed-off-by: Jason Lowe <jlowe@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir (NVIDIA#1062) * Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com> * List the latest SNAPSHOT jar file in local maven repo Signed-off-by: Tim Liu <timl@nvidia.com> * Get the path of 'dependency-info.sh', then set 'WORKSPACE' relative to it Signed-off-by: Tim Liu <timl@nvidia.com> * Only collect dependency info on Jenkins build * Only collect timestamped dependency in Jenkins build Collect snapshot dependency info only in Jenkins build, In dev build, print 'SNAPSHOT' tag without time stamp, e.g.: cudf-0.17-SNAPSHOT.jar * simplifying the dependencylogic
* Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com>
…)" (NVIDIA#1083) This reverts commit 0afbca6. Signed-off-by: Jason Lowe <jlowe@nvidia.com>
* Get cudf/spark dependency from the correct .m2 dir (NVIDIA#1062) * Get cudf/spark dependency from the correct .m2 dir 'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims. Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR': build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory To fix the error, we set the default values for them in 'build/dependency-info.sh': 'M2DIR=$HOME/.m2/repository' 'WORKSPACE=../..' We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'. Already updated Jenkins scripts to set the correct 'M2DIR'. Signed-off-by: Tim Liu <timl@nvidia.com> * let mvn package fails in case the script 'build/dependency-info.sh' runs failure * Stop mvn build if `build/build-info` fails Signed-off-by: Tim Liu <timl@nvidia.com> * Copyright 2020 Signed-off-by: Tim Liu <timl@nvidia.com> * List the latest SNAPSHOT jar file in local maven repo Signed-off-by: Tim Liu <timl@nvidia.com> * Get the path of 'dependency-info.sh', then set 'WORKSPACE' relative to it Signed-off-by: Tim Liu <timl@nvidia.com> * Only collect dependency info on Jenkins build * Only collect timestamped dependency in Jenkins build Collect snapshot dependency info only in Jenkins build, In dev build, print 'SNAPSHOT' tag without time stamp, e.g.: cudf-0.17-SNAPSHOT.jar * simplifying the dependencylogic
Bug: #1031
'WORKSPACE' & 'M2DIR' vars are needed for shims to gen the correct cudf/spark dependency info in shims.
Below error in 'spark*-info.properties' is due to unset of 'WORKSPACE' & 'M2DIR':
build/dependency-info.sh: line 30: /jenkins/printJarVersion.sh: No such file or directory
build/dependency-info.sh: line 33: /jenkins/printJarVersion.sh: No such file or directory
To fix the error, we set the default values for them in 'build/dependency-info.sh':
'M2DIR=$HOME/.m2/repository'
'WORKSPACE=../..'
We also need to explicitly set the correct 'M2DIR' path, in case we change it by '-Dmaven.repo.local=$M2DIR'.
Already updated Jenkins scripts to set the correct 'M2DIR'.
Signed-off-by: Tim Liu timl@nvidia.com