ci(release): widen the lock-sync retry window for PyPI propagation

The 0.7.6 release published fine but the follow-up lock sync failed: all
five uv add attempts (~80s total) still resolved against an index that only
listed 0.7.5. Wait up to 10 minutes instead so a slow index update no longer
turns a good release into a red job needing a manual re-run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jax Liu
2026-08-31 11:23:04 +08:00
co-authored by Claude Opus 5
parent cedc15b25c
commit 3a1005e4e3
+11 -6
View File
@@ -66,17 +66,22 @@ jobs:
working-directory: core/wren
run: |
# uv add rewrites the pyproject floor in place and relocks in one step;
# --no-sync skips the heavy env. Retry for PyPI index lag after publish.
for attempt in 1 2 3 4 5; do
# --no-sync skips the heavy env. Retry for PyPI index lag after publish:
# the release is only resolvable once the new version reaches the index
# uv reads, which has taken longer than the old ~80s window (0.7.6 saw
# five straight "only wren-core-py<=0.7.5 is available" failures).
attempts=10
delay=60
for attempt in $(seq 1 "${attempts}"); do
if uv add --no-sync "wren-core-py>=${VERSION}"; then
exit 0
fi
if [ "${attempt}" -lt 5 ]; then
echo "uv add attempt ${attempt} failed; retrying after PyPI propagation delay"
sleep 20
if [ "${attempt}" -lt "${attempts}" ]; then
echo "uv add attempt ${attempt}/${attempts} failed; retrying in ${delay}s for PyPI propagation"
sleep "${delay}"
fi
done
echo "::error::uv add did not succeed after retries"
echo "::error::uv add did not succeed after ${attempts} attempts"
exit 1
- name: Validate lockfile is consistent