Skip to content

Commit 326072a

Browse files
authored
Add retries to tool installs (#546)
# Summary We often encounter setup failures in the CI. This PR adds retries to mitigate these transient installation failures. ## Proof of Work CI is green, and we see less setup failures
1 parent 2b99a7f commit 326072a

File tree

9 files changed

+15
-13
lines changed

9 files changed

+15
-13
lines changed

.evergreen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ buildvariants:
13891389
display_name: e2e_operator_race_ubi_with_telemetry
13901390
tags: [ "pr_patch", "staging", "e2e_test_suite" ]
13911391
run_on:
1392-
- ubuntu1804-xlarge
1392+
- ubuntu2404-xlarge
13931393
<<: *base_om7_dependency_with_race
13941394
tasks:
13951395
- name: e2e_operator_race_with_telemetry_task_group
@@ -1666,7 +1666,7 @@ buildvariants:
16661666
tags: [ "pr_patch", "staging", "e2e_mco_test_suite" ]
16671667
<<: *community_dependency
16681668
run_on:
1669-
- ubuntu2004-large
1669+
- ubuntu2404-large
16701670

16711671
## Manual (patch) E2E tests not run for every PR and commit
16721672

scripts/evergreen/lint_code.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ required_version="v2.0.2"
77
# Install or update golangci-lint if not installed or version is incorrect
88
if ! [[ -x "$(command -v golangci-lint)" ]]; then
99
echo "Installing/updating golangci-lint to version ${required_version}..."
10-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)"/bin "${required_version}"
10+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 -sSL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)"/bin "${required_version}"
1111
else
1212
echo "golangci-lint is already installed"
1313
fi

scripts/evergreen/setup_aws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ install_aws_cli_binary() {
1919
cd "${temp_dir}"
2020

2121
echo "Downloading AWS CLI v2 for ${aws_arch}..."
22-
curl -s "https://awscli.amazonaws.com/awscli-exe-linux-${aws_arch}.zip" -o "awscliv2.zip"
22+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 -s "https://awscli.amazonaws.com/awscli-exe-linux-${aws_arch}.zip" -o "awscliv2.zip"
2323

2424
unzip -q awscliv2.zip
2525
sudo ./aws/install --update

scripts/evergreen/setup_gcloud_cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -Eeou pipefail
33

44
source scripts/dev/set_env_context.sh
55

6-
curl -s --retry 3 -LO "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz"
6+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 --silent -LO "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz"
77
tar xf google-cloud-cli-linux-x86_64.tar.gz -C "${workdir}"
88
"${workdir}"/google-cloud-sdk/install.sh --quiet
99
source "${workdir}/google-cloud-sdk/path.bash.inc"

scripts/evergreen/setup_kubectl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mv kubectl "${bindir}"
2525
echo "Downloading helm for ${ARCH}"
2626
helm_archive="${tmpdir}/helm.tgz"
2727
helm_version="v3.17.1"
28-
curl -s https://get.helm.sh/helm-${helm_version}-linux-"${ARCH}".tar.gz --output "${helm_archive}"
28+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 -s https://get.helm.sh/helm-${helm_version}-linux-"${ARCH}".tar.gz --output "${helm_archive}"
2929

3030
tar xfz "${helm_archive}" -C "${tmpdir}" &> /dev/null
3131
mv "${tmpdir}/linux-${ARCH}/helm" "${bindir}"

scripts/evergreen/setup_mongosh.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ set -Eeou pipefail
44
source scripts/dev/set_env_context.sh
55

66
bindir="${workdir:?}/bin"
7-
mkdir -p "${bindir}"
7+
tmpdir="${workdir:?}/tmp"
8+
mkdir -p "${bindir}" "${tmpdir}"
89

9-
curl -s --retry 3 -LO "https://downloads.mongodb.com/compass/mongosh-2.3.8-linux-x64.tgz"
10-
tar -zxvf mongosh-2.3.8-linux-x64.tgz
11-
cd mongosh-2.3.8-linux-x64/bin
10+
# Download mongosh archive
11+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 --silent -LO "https://downloads.mongodb.com/compass/mongosh-2.3.8-linux-x64.tgz"
12+
tar -zxvf mongosh-2.3.8-linux-x64.tgz -C "${tmpdir}"
13+
cd "${tmpdir}/mongosh-2.3.8-linux-x64/bin"
1214
./mongosh --version
1315
mv mongosh "${bindir}"

scripts/evergreen/setup_prepare_openshift_bundles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fi
3333

3434
# there is no mac build in for arm64
3535
opm_arch="amd64"
36-
curl -L --retry 3 -o opm.tar.gz "https://mirror.openshift.com/pub/openshift-v4/${opm_arch}/clients/ocp/latest-4.12/opm-${opm_os}.tar.gz"
36+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 -L -o opm.tar.gz "https://mirror.openshift.com/pub/openshift-v4/${opm_arch}/clients/ocp/latest-4.12/opm-${opm_os}.tar.gz"
3737

3838
# TODO: Sometimes tar is failing for unknown reasons in EVG. This is left intentionally. Remove if not causing problems anymore.
3939
ls -al opm.tar.gz

scripts/evergreen/setup_shellcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mkdir -p "${bindir}" "${tmpdir}"
1010
echo "Downloading shellcheck"
1111
shellcheck_archive="${tmpdir}/shellcheck.tar.xz"
1212
shellcheck_version="v0.9.0"
13-
curl --retry 3 --silent -L "https://github.com/koalaman/shellcheck/releases/download/${shellcheck_version}/shellcheck-${shellcheck_version}.linux.x86_64.tar.xz" -o "${shellcheck_archive}"
13+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 --silent -L "https://github.com/koalaman/shellcheck/releases/download/${shellcheck_version}/shellcheck-${shellcheck_version}.linux.x86_64.tar.xz" -o "${shellcheck_archive}"
1414
tar -xf "${shellcheck_archive}" -C "${tmpdir}"
1515
mv "${tmpdir}/shellcheck-${shellcheck_version}/shellcheck" "${bindir}"
1616
rm "${shellcheck_archive}"

scripts/funcs/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ download_and_install_binary() {
4646

4747
mkdir -p "${dir}"
4848
echo "Downloading ${url}"
49-
curl --retry 3 --silent -L "${url}" -o "${bin}"
49+
curl --retry 5 --retry-delay 3 --retry-all-errors --fail --show-error --max-time 180 --silent -L "${url}" -o "${bin}"
5050
chmod +x "${bin}"
5151
mv "${bin}" "${dir}"
5252
echo "Installed ${bin} to ${dir}"

0 commit comments

Comments
 (0)