Skip to content

Commit 2d5a6fc

Browse files
levon003claude
andcommitted
Fix smoke-test install: bust uv index cache on retry
The smoke-test jobs retry `uv pip install python-flexeval==<version>` to absorb index propagation lag after publish. But uv caches the simple-index listing on the first attempt, so when that attempt runs before the new version has propagated, every subsequent retry reuses the stale cached listing and fails with "no version of python-flexeval==<version>" — even though the version is already live. This is what failed smoke-test-pypi on the v0.5.1 release: 0.5.1 was fully published (both files present on PyPI), but the job's 6 retries all saw the cached pre-publish listing. Add --refresh-package python-flexeval so each retry re-fetches that package's index metadata (deps stay cached). Verified locally that a plain install reproduced the stale-cache failure while --refresh-package resolved 0.5.1. Applied to both the PyPI and TestPyPI smoke jobs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 44c7546 commit 2d5a6fc

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/deploy-to-pypi.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,16 @@ jobs:
114114
- name: Install just-published build from PyPI into a clean venv
115115
# Install into a fresh venv (NOT the repo's env) so we exercise the
116116
# published wheel, not the source tree. The PyPI index can lag a few
117-
# seconds behind publish, so retry the install.
117+
# seconds behind publish, so retry the install. --refresh-package forces
118+
# uv to re-fetch python-flexeval's index metadata on each attempt;
119+
# otherwise uv caches the pre-publish listing and every retry sees the
120+
# same stale "no such version" result.
118121
run: |
119122
uv venv /tmp/smoke-env
120123
version="${{ steps.version.outputs.version }}"
121124
for attempt in 1 2 3 4 5 6; do
122125
if uv pip install --python /tmp/smoke-env \
126+
--refresh-package python-flexeval \
123127
"python-flexeval==${version}"; then
124128
break
125129
fi
@@ -206,11 +210,15 @@ jobs:
206210
# published wheel, not the source tree. Deps come from real PyPI; only
207211
# python-flexeval itself comes from TestPyPI. The TestPyPI simple index
208212
# can lag a few seconds behind publish, so retry the install.
213+
# --refresh-package forces uv to re-fetch python-flexeval's index metadata
214+
# on each attempt; otherwise uv caches the pre-publish listing and every
215+
# retry sees the same stale "no such version" result.
209216
run: |
210217
uv venv /tmp/smoke-env
211218
version="${{ steps.version.outputs.version }}"
212219
for attempt in 1 2 3 4 5 6; do
213220
if uv pip install --python /tmp/smoke-env \
221+
--refresh-package python-flexeval \
214222
--index-url https://test.pypi.org/simple/ \
215223
--extra-index-url https://pypi.org/simple/ \
216224
--index-strategy unsafe-best-match \

0 commit comments

Comments
 (0)