Skip to content

Commit 0072ce6

Browse files
authored
Curl retries in a few bits to make build scripts less susceptible to transient flakes (#121)
1 parent 2a0d354 commit 0072ce6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

hack/build/firmware.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if [ "${KERNEL_FLAVOR}" = "zone-nvidiagpu" ] && [ "${TARGET_ARCH_STANDARD}" = "x
7575
mkdir -p "$NV_EXTRACT_PATH"
7676

7777
echo "Downloading NVIDIA runtime package for driver ${NV_VERSION} from: $NV_RUN_URL"
78-
curl -L -o "$NV_EXTRACT_PATH/$NV_RUN_FILE" "$NV_RUN_URL"
78+
curl --retry 5 --retry-delay 2 --retry-max-time 30 --retry-all-errors -L -o "$NV_EXTRACT_PATH/$NV_RUN_FILE" "$NV_RUN_URL"
7979
chmod +x "$NV_EXTRACT_PATH/$NV_RUN_FILE"
8080
"$NV_EXTRACT_PATH/$NV_RUN_FILE" -x --target "$NV_EXTRACT_PATH/out"
8181
# Compress firmwares on-disk

hack/build/nvidiagpu-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222

2323
echo "Fetching nvidia module release: $NV_VERSION"
2424

25-
RELEASE_JSON=$(curl -s "https://api.github.com/repos/${NV_KMOD_REPO_OWNER}/${NV_KMOD_REPO_NAME}/releases/tags/${NV_VERSION}")
25+
RELEASE_JSON=$(curl -s --retry 5 --retry-delay 2 --retry-max-time 30 --retry-all-errors "https://api.github.com/repos/${NV_KMOD_REPO_OWNER}/${NV_KMOD_REPO_NAME}/releases/tags/${NV_VERSION}")
2626
TARBALL_URL=$(echo "$RELEASE_JSON" | grep -o '"tarball_url": *"[^"]*"' | sed 's/"tarball_url": *"\(.*\)"/\1/')
2727
if [ -z "$TARBALL_URL" ]; then
2828
echo "Failed to fetch release information for version $NV_VERSION"

0 commit comments

Comments
 (0)