Skip to content

Commit 59aca14

Browse files
Add retries to the install action for resilience (#2608)
## What Make the `stellar/stellar-cli` install action resilient to transient network failures by adding retries to its two network-dependent steps: - **Binary download:** the `curl` call now retries up to 5 times with backoff (`--retry 5 --retry-delay 5 --retry-connrefused --retry-all-errors`), bounded by `--connect-timeout 30` and `--max-time 300`. The download now goes to a file (`$RUNNER_TEMP`) before being extracted by `tar`, rather than piping `curl` straight into `tar`, so that a retried transfer can safely restart without corrupting the tar stream. - **Attestation verification:** the `gh attestation verify` step, which also hits the network, is now wrapped in a retry loop (5 attempts with exponential backoff) before failing. ## Why A single transient network blip previously failed the whole job — for example [this rs-soroban-sdk run](https://github.com/stellar/rs-soroban-sdk/actions/runs/27120352954/job/80046147824) failed during the install step. With retries in place, a momentary failure is retried instead of failing the build. This mirrors the approach taken in [stellar/actions#104](stellar/actions#104), which added curl's built-in retry flags to harden a similar download path.
1 parent b4b050c commit 59aca14

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,17 @@ runs:
6666
file="stellar-cli-$version-$os_arch.tar.gz"
6767
url="https://github.com/stellar/stellar-cli/releases/download/v$version/$file"
6868
echo "$url"
69-
curl -fL "$url" | tar xvz -C $HOME/.local/bin
69+
archive="$RUNNER_TEMP/stellar-cli.tar.gz"
70+
curl -fL \
71+
--retry 5 \
72+
--retry-delay 5 \
73+
--retry-connrefused \
74+
--retry-all-errors \
75+
--connect-timeout 30 \
76+
--max-time 300 \
77+
-o "$archive" \
78+
"$url"
79+
tar xvz -C $HOME/.local/bin -f "$archive"
7080
7181
- name: Verify binary against attestation
7282
shell: bash

0 commit comments

Comments
 (0)