From 561f72e178cf8336850cb508582549599ce34a49 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 5 Apr 2026 16:37:04 +0900 Subject: [PATCH] Revert "Remove duplicated retry" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2c637c3acd58d858d7d0b2978a98bd432c7e488f. Since this change, we’ve started encountering 5xx errors that cannot be resolved with our retry mechanism. --- CHANGELOG.md | 2 ++ main.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 280e415e..d6d3167e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com See the ["Security" section in readme](https://github.com/taiki-e/install-action#security) for more details. +- Improve robustness for network failure. + - Documentation improvements. ## [2.72.0] - 2026-04-04 diff --git a/main.sh b/main.sh index a4434ede..c44e4a70 100755 --- a/main.sh +++ b/main.sh @@ -56,7 +56,7 @@ download_and_checksum() { checksum='' fi info "downloading ${url}" - retry curl --proto '=https' --tlsv1.2 -fsSL "${url}" -o tmp + retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 -o tmp "${url}" if [[ -n "${checksum}" ]]; then info "verifying sha256 checksum for $(basename -- "${url}")" if type -P sha256sum >/dev/null; then @@ -233,7 +233,7 @@ read_manifest() { # TODO: don't hardcode tool name and use 'immediate_yank_reflection' field in base manifest. case "${tool}" in cargo-nextest) - crate_info=$(retry curl --user-agent "${ACTION_USER_AGENT}" --proto '=https' --tlsv1.2 -fsSL "https://crates.io/api/v1/crates/${rust_crate}" || true) + crate_info=$(retry curl --user-agent "${ACTION_USER_AGENT}" --proto '=https' --tlsv1.2 -fsSL --retry 10 "https://crates.io/api/v1/crates/${rust_crate}" || true) if [[ -n "${crate_info}" ]]; then while true; do yanked=$(jq -r ".versions[] | select(.num == \"${exact_version}\") | .yanked" <<<"${crate_info}")