mirror of
https://github.com/Canner/WrenAI.git
synced 2026-10-16 15:07:41 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user