Skip to content

Commit 9669cfe

Browse files
hjmjohnsonclaude
andcommitted
COMP: Add retry logic to all curl downloads for transient failures
Add --retry 3 --retry-delay 30 --retry-all-errors to all curl calls in the CXX and Python build workflows. This handles transient HTTP 502/503 errors from GitHub raw content CDN and other download sources that intermittently cause CI failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6f12423 commit 9669cfe

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/build-test-cxx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
147147
- name: Fetch CTest driver script
148148
run: |
149-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
149+
curl --retry 3 --retry-delay 30 --retry-all-errors -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
150150
151151
- name: Configure CTest script
152152
shell: bash

.github/workflows/build-test-package-python.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
100100
VARS_URL="https://raw.githubusercontent.com/${IPP_ORG}/ITKPythonPackage/${IPP_TAG}/scripts/dockcross-manylinux-set-vars.sh"
101101
echo "Fetching image tags from ${VARS_URL}"
102-
curl -fsSL "${VARS_URL}" -o /tmp/set-vars.sh || { echo "Could not fetch set-vars.sh, skipping pre-pull"; exit 0; }
102+
curl --retry 3 --retry-delay 30 --retry-all-errors -fsSL "${VARS_URL}" -o /tmp/set-vars.sh || { echo "Could not fetch set-vars.sh, skipping pre-pull"; exit 0; }
103103
source /tmp/set-vars.sh
104104
105105
if [[ -z ${CONTAINER_SOURCE} ]]; then
@@ -132,7 +132,7 @@ jobs:
132132
IPP_DOWNLOAD_GIT_TAG=${IPP_DOWNLOAD_GIT_TAG:=main}
133133
IPP_DOWNLOAD_ORG=${{ inputs.itk-python-package-org }}
134134
IPP_DOWNLOAD_ORG=${IPP_DOWNLOAD_ORG:=InsightSoftwareConsortium}
135-
curl -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG}/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
135+
curl --retry 3 --retry-delay 30 --retry-all-errors -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG}/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
136136
chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
137137
138138
- name: 'Build 🐍 Python 📦 package'
@@ -235,7 +235,7 @@ jobs:
235235
236236
VARS_URL="https://raw.githubusercontent.com/${IPP_ORG}/ITKPythonPackage/${IPP_TAG}/scripts/dockcross-manylinux-set-vars.sh"
237237
echo "Fetching image tags from ${VARS_URL}"
238-
curl -fsSL "${VARS_URL}" -o /tmp/set-vars.sh || { echo "Could not fetch set-vars.sh, skipping pre-pull"; exit 0; }
238+
curl --retry 3 --retry-delay 30 --retry-all-errors -fsSL "${VARS_URL}" -o /tmp/set-vars.sh || { echo "Could not fetch set-vars.sh, skipping pre-pull"; exit 0; }
239239
source /tmp/set-vars.sh
240240
241241
if [[ -z ${CONTAINER_SOURCE} ]]; then
@@ -267,7 +267,7 @@ jobs:
267267
IPP_DOWNLOAD_GIT_TAG=${IPP_DOWNLOAD_GIT_TAG:=main}
268268
IPP_DOWNLOAD_ORG=${{ inputs.itk-python-package-org }}
269269
IPP_DOWNLOAD_ORG=${IPP_DOWNLOAD_ORG:=InsightSoftwareConsortium}
270-
curl -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG}/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
270+
curl --retry 3 --retry-delay 30 --retry-all-errors -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG}/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
271271
chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
272272
273273
- name: 'Build 🐍 Python 📦 package'
@@ -355,7 +355,7 @@ jobs:
355355
IPP_DOWNLOAD_GIT_TAG=${IPP_DOWNLOAD_GIT_TAG:=main}
356356
IPP_DOWNLOAD_ORG=${{ inputs.itk-python-package-org }}
357357
IPP_DOWNLOAD_ORG=${IPP_DOWNLOAD_ORG:=InsightSoftwareConsortium}
358-
curl -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG}/scripts/macpython-download-cache-and-build-module-wheels.sh -O
358+
curl --retry 3 --retry-delay 30 --retry-all-errors -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG}/scripts/macpython-download-cache-and-build-module-wheels.sh -O
359359
chmod u+x macpython-download-cache-and-build-module-wheels.sh
360360
361361
- name: 'Build 🐍 Python 📦 package'

0 commit comments

Comments
 (0)