Skip to content

Commit 20af0e9

Browse files
committed
Add retry logic to stdgems.org curl requests in CI
The curl requests to stdgems.org occasionally fail with connection errors, causing spurious CI failures. Add curl's built-in retry flags to handle transient network issues with exponential backoff. example: https://github.com/ruby/ruby/actions/runs/23825769292/job/69448266927
1 parent 60de70c commit 20af0e9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/bundled_gems.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
mkdir -p .downloaded-cache
5757
for data in bundled_gems.json default_gems.json; do
5858
ln -s .downloaded-cache/$data .
59-
curl -O -R -z ./$data https://stdgems.org/$data
59+
curl --retry 5 --retry-connrefused --retry-delay 2 --retry-max-time 60 -O -R -z ./$data https://stdgems.org/$data
6060
done
6161
6262
- name: Update bundled gems list

.github/workflows/default_gems_list.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
data=default_gems.json
4444
mkdir -p .downloaded-cache
4545
ln -s .downloaded-cache/$data .
46-
curl -O -R -z ./$data https://stdgems.org/$data
46+
curl --retry 5 --retry-connrefused --retry-delay 2 --retry-max-time 60 -O -R -z ./$data https://stdgems.org/$data
4747
if: ${{ steps.gems.outcome == 'success' }}
4848

4949
- name: Make default gems list

0 commit comments

Comments
 (0)