From 786b5ce6184c985d783056024d4f9243b97b3ed4 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Aug 2024 16:47:24 -0700 Subject: [PATCH 1/4] Empty commit to test CI From a83b0355de6c3c039f9314ed3f16f67e826d5717 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Aug 2024 16:54:58 -0700 Subject: [PATCH 2/4] Add blank lines to tools scripts to run CI --- tools/gpuci_conda_retry | 1 + tools/gpuci_logger | 1 + tools/gpuci_mamba_retry | 1 + tools/gpuci_retry | 1 + tools/rapids-build-type | 1 + tools/rapids-download-conda-from-s3 | 1 + tools/rapids-env-update | 1 + tools/rapids-s3-path | 1 + tools/rapids-size-checker | 1 + tools/rapids-upload-conda-to-s3 | 1 + tools/rapids-upload-to-anaconda | 1 + 11 files changed, 11 insertions(+) diff --git a/tools/gpuci_conda_retry b/tools/gpuci_conda_retry index ab3e7f1..c0c4118 100755 --- a/tools/gpuci_conda_retry +++ b/tools/gpuci_conda_retry @@ -22,6 +22,7 @@ # seconds, to wait between retries. # Default is a 10 second sleep # + set -o pipefail condaretry_help=" diff --git a/tools/gpuci_logger b/tools/gpuci_logger index d323164..960681b 100755 --- a/tools/gpuci_logger +++ b/tools/gpuci_logger @@ -4,6 +4,7 @@ # # provides a logging mechanism for scripts to report progress # + function gpuci_logger { TS=$(date '+%x %T') # shellcheck disable=SC2000 diff --git a/tools/gpuci_mamba_retry b/tools/gpuci_mamba_retry index 8413d0a..f925f4d 100755 --- a/tools/gpuci_mamba_retry +++ b/tools/gpuci_mamba_retry @@ -22,6 +22,7 @@ # seconds, to wait between retries. # Default is a 10 second sleep # + set -o pipefail mambaretry_help=" diff --git a/tools/gpuci_retry b/tools/gpuci_retry index 8cd3ab8..ea18c5b 100755 --- a/tools/gpuci_retry +++ b/tools/gpuci_retry @@ -26,6 +26,7 @@ # seconds, to wait between retries. # Default is a 10 second sleep # + function gpuci_retry { command=$1 shift diff --git a/tools/rapids-build-type b/tools/rapids-build-type index 9093091..90c1337 100755 --- a/tools/rapids-build-type +++ b/tools/rapids-build-type @@ -2,6 +2,7 @@ # A utility script that examines environment variables provided # by Jenkins to determine whether a given build is a "nightly", "pull-request", # or "branch" build. + set -e echo_build_type() { diff --git a/tools/rapids-download-conda-from-s3 b/tools/rapids-download-conda-from-s3 index cd23877..59a572d 100755 --- a/tools/rapids-download-conda-from-s3 +++ b/tools/rapids-download-conda-from-s3 @@ -4,6 +4,7 @@ # Positional Arguments: # 1) a string of "cpp" or "python" which determines which conda artifact # should be downloaded + set -e PKG_TYPE="$1" diff --git a/tools/rapids-env-update b/tools/rapids-env-update index 0550ab6..0f7f543 100755 --- a/tools/rapids-env-update +++ b/tools/rapids-env-update @@ -2,6 +2,7 @@ # A utility script that examines environment variables provided # by Jenkins to make some environment changes depending on whether # a nightly or stable build is occurring. + set -e diff --git a/tools/rapids-s3-path b/tools/rapids-s3-path index 9b39d07..a881844 100755 --- a/tools/rapids-s3-path +++ b/tools/rapids-s3-path @@ -5,6 +5,7 @@ # Positional Arguments: # 1) a string of "cpp" or "python" which determines which artifact path # name should be returned + set -e PKG_TYPE="$1" diff --git a/tools/rapids-size-checker b/tools/rapids-size-checker index daa4292..4f02f53 100755 --- a/tools/rapids-size-checker +++ b/tools/rapids-size-checker @@ -1,4 +1,5 @@ #!/bin/bash + set -e REPO_NAME=$(basename "${GIT_URL}" .git) diff --git a/tools/rapids-upload-conda-to-s3 b/tools/rapids-upload-conda-to-s3 index b492da0..70c0286 100755 --- a/tools/rapids-upload-conda-to-s3 +++ b/tools/rapids-upload-conda-to-s3 @@ -3,6 +3,7 @@ # Positional Arguments: # 1) a string of "cpp" or "python" which determines which conda artifact # should be uploaded + set -e PKG_TYPE="$1" diff --git a/tools/rapids-upload-to-anaconda b/tools/rapids-upload-to-anaconda index 7a95e8b..94067f6 100755 --- a/tools/rapids-upload-to-anaconda +++ b/tools/rapids-upload-to-anaconda @@ -3,6 +3,7 @@ # uploads them to Anaconda.org # Positional Arguments: # 1) a directory path to search for conda packages + set -e SEARCH_DIR="$1" From ecb589fe9a155b22350236dff63f89bf6c6b1d6f Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Aug 2024 16:58:49 -0700 Subject: [PATCH 3/4] Revert "Add blank lines to tools scripts to run CI" This reverts commit a83b0355de6c3c039f9314ed3f16f67e826d5717. --- tools/gpuci_conda_retry | 1 - tools/gpuci_logger | 1 - tools/gpuci_mamba_retry | 1 - tools/gpuci_retry | 1 - tools/rapids-build-type | 1 - tools/rapids-download-conda-from-s3 | 1 - tools/rapids-env-update | 1 - tools/rapids-s3-path | 1 - tools/rapids-size-checker | 1 - tools/rapids-upload-conda-to-s3 | 1 - tools/rapids-upload-to-anaconda | 1 - 11 files changed, 11 deletions(-) diff --git a/tools/gpuci_conda_retry b/tools/gpuci_conda_retry index c0c4118..ab3e7f1 100755 --- a/tools/gpuci_conda_retry +++ b/tools/gpuci_conda_retry @@ -22,7 +22,6 @@ # seconds, to wait between retries. # Default is a 10 second sleep # - set -o pipefail condaretry_help=" diff --git a/tools/gpuci_logger b/tools/gpuci_logger index 960681b..d323164 100755 --- a/tools/gpuci_logger +++ b/tools/gpuci_logger @@ -4,7 +4,6 @@ # # provides a logging mechanism for scripts to report progress # - function gpuci_logger { TS=$(date '+%x %T') # shellcheck disable=SC2000 diff --git a/tools/gpuci_mamba_retry b/tools/gpuci_mamba_retry index f925f4d..8413d0a 100755 --- a/tools/gpuci_mamba_retry +++ b/tools/gpuci_mamba_retry @@ -22,7 +22,6 @@ # seconds, to wait between retries. # Default is a 10 second sleep # - set -o pipefail mambaretry_help=" diff --git a/tools/gpuci_retry b/tools/gpuci_retry index ea18c5b..8cd3ab8 100755 --- a/tools/gpuci_retry +++ b/tools/gpuci_retry @@ -26,7 +26,6 @@ # seconds, to wait between retries. # Default is a 10 second sleep # - function gpuci_retry { command=$1 shift diff --git a/tools/rapids-build-type b/tools/rapids-build-type index 90c1337..9093091 100755 --- a/tools/rapids-build-type +++ b/tools/rapids-build-type @@ -2,7 +2,6 @@ # A utility script that examines environment variables provided # by Jenkins to determine whether a given build is a "nightly", "pull-request", # or "branch" build. - set -e echo_build_type() { diff --git a/tools/rapids-download-conda-from-s3 b/tools/rapids-download-conda-from-s3 index 59a572d..cd23877 100755 --- a/tools/rapids-download-conda-from-s3 +++ b/tools/rapids-download-conda-from-s3 @@ -4,7 +4,6 @@ # Positional Arguments: # 1) a string of "cpp" or "python" which determines which conda artifact # should be downloaded - set -e PKG_TYPE="$1" diff --git a/tools/rapids-env-update b/tools/rapids-env-update index 0f7f543..0550ab6 100755 --- a/tools/rapids-env-update +++ b/tools/rapids-env-update @@ -2,7 +2,6 @@ # A utility script that examines environment variables provided # by Jenkins to make some environment changes depending on whether # a nightly or stable build is occurring. - set -e diff --git a/tools/rapids-s3-path b/tools/rapids-s3-path index a881844..9b39d07 100755 --- a/tools/rapids-s3-path +++ b/tools/rapids-s3-path @@ -5,7 +5,6 @@ # Positional Arguments: # 1) a string of "cpp" or "python" which determines which artifact path # name should be returned - set -e PKG_TYPE="$1" diff --git a/tools/rapids-size-checker b/tools/rapids-size-checker index 4f02f53..daa4292 100755 --- a/tools/rapids-size-checker +++ b/tools/rapids-size-checker @@ -1,5 +1,4 @@ #!/bin/bash - set -e REPO_NAME=$(basename "${GIT_URL}" .git) diff --git a/tools/rapids-upload-conda-to-s3 b/tools/rapids-upload-conda-to-s3 index 70c0286..b492da0 100755 --- a/tools/rapids-upload-conda-to-s3 +++ b/tools/rapids-upload-conda-to-s3 @@ -3,7 +3,6 @@ # Positional Arguments: # 1) a string of "cpp" or "python" which determines which conda artifact # should be uploaded - set -e PKG_TYPE="$1" diff --git a/tools/rapids-upload-to-anaconda b/tools/rapids-upload-to-anaconda index 94067f6..7a95e8b 100755 --- a/tools/rapids-upload-to-anaconda +++ b/tools/rapids-upload-to-anaconda @@ -3,7 +3,6 @@ # uploads them to Anaconda.org # Positional Arguments: # 1) a directory path to search for conda packages - set -e SEARCH_DIR="$1" From 7f824417e1b2b4ccd948a9135100459643913887 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 29 Aug 2024 16:59:02 -0700 Subject: [PATCH 4/4] Apply `shellcheck` fixes to `tools` scripts CI started failing on `main`. Looks like this was due to a `shellcheck` failure. This applies the fix proposed by `shellcheck` to clear CI issues. --- tools/gpuci_retry | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gpuci_retry b/tools/gpuci_retry index 8cd3ab8..a154a1c 100755 --- a/tools/gpuci_retry +++ b/tools/gpuci_retry @@ -39,7 +39,7 @@ function gpuci_retry { (( retries < max_retries )); do ((retries++)) gpuci_logger "gpuci_retry: retry ${retries} of ${max_retries} | exit code: (${retcode}) -> sleeping for ${sleep_interval} seconds..." - sleep ${sleep_interval} + sleep "${sleep_interval}" gpuci_logger "gpuci_retry: sleep done -> retrying..." ${command} "$@"