Skip to content

Commit 0d28d22

Browse files
committed
diag: shorten publish retry window to 6 for fast error surfacing
1 parent 5282462 commit 0d28d22

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Justfile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ publish:
8585
for ((i = 0; i < n; i++)); do
8686
pkg=${CRATES[i]}
8787
published=0
88-
for attempt in $(seq 1 60); do
88+
for attempt in $(seq 1 6); do
8989
# Drop the cached crates.io index so each attempt re-fetches the latest
9090
# entry for a freshly published sibling. The `just ci` step populates the
9191
# index cache before any crate is published, so without this cargo trusts
@@ -96,12 +96,12 @@ publish:
9696
elif echo "$out" | grep -qiE "already (uploaded|published)|already exists|is already"; then
9797
echo "skip $pkg (already on crates.io)"; published=1; break
9898
elif echo "$out" | grep -qiE "no matching package|timed out|waiting for published"; then
99-
echo "$pkg blocked on dependency index propagation (attempt $attempt/60); last cargo output:"; printf '%s\n' "$out" | tail -n 15; echo "retrying in 20s"; sleep 20
99+
echo "$pkg blocked on dependency index propagation (attempt $attempt/6); last cargo output:"; printf '%s\n' "$out" | tail -n 15; echo "retrying in 20s"; sleep 20
100100
else
101101
echo "failed to publish $pkg:"; printf '%s\n' "$out"; exit 1
102102
fi
103103
done
104-
if ((published == 0)); then echo "gave up on $pkg after 60 attempts"; exit 1; fi
104+
if ((published == 0)); then echo "gave up on $pkg after 6 attempts"; exit 1; fi
105105
if ((i < n - 1)); then sleep 60; fi
106106
done
107107

0 commit comments

Comments
 (0)