From ede65b2776b1abb7450b61efc8237307b2c0dc40 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Aug 2026 18:24:55 +0000 Subject: [PATCH] Added retries to the rust downloads The rust component tarballs are downloaded with wget the same way as the protoc release asset, which failed a nightly with wget exit 8, a transient server error. Apply the same retry loop as in the protoc install script (#2426). --- ci/linux-install-rust.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ci/linux-install-rust.sh b/ci/linux-install-rust.sh index a3811a556..ebeb43ffa 100755 --- a/ci/linux-install-rust.sh +++ b/ci/linux-install-rust.sh @@ -53,7 +53,24 @@ install_rust() { name="$1" sha="$2" tarball="$name.tar.gz" - wget --quiet "$baseurl/$tarball" + + # Retry in case of transient errors. + tries=3 + while [ $tries -gt 0 ]; do + # -O keeps every attempt writing to the same file rather than adding a .1 suffix. + status=0 + wget --quiet -O "$tarball" "$baseurl/$tarball" || status=$? + if [ $status -eq 0 ]; then + break + fi + tries=$((tries - 1)) + sleep 10 + done + if [ $tries -eq 0 ]; then + echo "wget failed with status $status: $baseurl/$tarball" >&2 + exit 1 + fi + echo "$sha $tarball" | sha256sum --check - tar xf "$tarball" rm "$tarball"