Skip to content

Commit f59c303

Browse files
committed
Retry guix pull in Guix validation workflows
guix pull keeps hitting transient infrastructure errors (substitute download failures, git/SSL fetch errors) that abort the run before any package is tested. Retry the pull up to three times so a single transient blip no longer fails the workflow; --fallback already covers substitute outages, and the retry additionally covers git/SSL fetch hiccups.
1 parent f27b50c commit f59c303

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/check-guix-click.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@ jobs:
3636
(url "https://codeberg.org/tutu967/guix.git")
3737
(branch "python-click-8.4.1")))
3838
CHANNELS
39-
guix pull --channels=/tmp/channels.scm --disable-authentication --fallback --verbosity=0
39+
# guix pull intermittently fails on transient substitute or git/SSL
40+
# errors; retry a few times before giving up.
41+
for attempt in 1 2 3; do
42+
echo "guix pull attempt ${attempt}..."
43+
if guix pull --channels=/tmp/channels.scm --disable-authentication --fallback --verbosity=0; then
44+
break
45+
fi
46+
[ "${attempt}" -eq 3 ] && { echo "guix pull failed after 3 attempts"; exit 1; }
47+
echo "retrying in 30s..."
48+
sleep 30
49+
done
4050
echo "$HOME/.config/guix/current/bin" >> "$GITHUB_PATH"
4151
4252
- name: Report rebuild scope

.github/workflows/check-guix-deps.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,17 @@ jobs:
3131
(url "https://codeberg.org/tutu967/guix.git")
3232
(branch "mpm-and-dependencies")))
3333
CHANNELS
34-
guix pull --channels=/tmp/channels.scm --disable-authentication --fallback --verbosity=0
34+
# guix pull intermittently fails on transient substitute or git/SSL
35+
# errors; retry a few times before giving up.
36+
for attempt in 1 2 3; do
37+
echo "guix pull attempt ${attempt}..."
38+
if guix pull --channels=/tmp/channels.scm --disable-authentication --fallback --verbosity=0; then
39+
break
40+
fi
41+
[ "${attempt}" -eq 3 ] && { echo "guix pull failed after 3 attempts"; exit 1; }
42+
echo "retrying in 30s..."
43+
sleep 30
44+
done
3545
echo "$HOME/.config/guix/current/bin" >> "$GITHUB_PATH"
3646
3747
- name: Lint all new packages

0 commit comments

Comments
 (0)