Skip to content

Commit 24b73fe

Browse files
leliaclaude
andcommitted
fix(ci): extend PyPI verify budget to 30 minutes and log index staleness
Match the socket-python-cli release workflow hardening (PR #290 there): the 2026-08-05 propagation delay exceeded 10 minutes from the release runner's vantage point, so extend the retry budget to 30 minutes, and log when the JSON API already has the version but the Simple index does not, making CDN propagation delay distinguishable from a failed publish in the logs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
1 parent 07ae95f commit 24b73fe

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ jobs:
6060
env:
6161
VERSION: ${{ env.VERSION }}
6262
run: |
63-
# The first lookup can race PyPI's Simple-index propagation. pip caches HTTP
64-
# responses by default, so without --no-cache-dir every retry can reuse that
65-
# initial stale response instead of checking whether the release has appeared.
66-
MAX_ATTEMPTS=40
63+
# The first lookup can race PyPI's Simple-index propagation, and a delayed
64+
# CDN purge can leave the index stale for 10+ minutes after a successful
65+
# upload (socketdev 3.4.2 and socketsecurity 2.5.9 both hit this on
66+
# 2026-08-05). pip caches HTTP responses by default, so without
67+
# --no-cache-dir every retry can reuse that initial stale response instead
68+
# of checking whether the release has appeared. Budget: 30 minutes.
69+
MAX_ATTEMPTS=60
6770
for i in $(seq 1 "$MAX_ATTEMPTS"); do
6871
if python -m pip install \
6972
--no-cache-dir \
@@ -74,9 +77,12 @@ jobs:
7477
echo "success=true" >> "$GITHUB_OUTPUT"
7578
exit 0
7679
fi
80+
if curl -s -f "https://pypi.org/pypi/socketdev/${VERSION}/json" > /dev/null; then
81+
echo "Release ${VERSION} exists on PyPI (JSON API) but is not in the Simple index yet - CDN propagation delay"
82+
fi
7783
if [ "$i" -lt "$MAX_ATTEMPTS" ]; then
78-
echo "Attempt $i: Package not yet installable, waiting 20s... (${i}/${MAX_ATTEMPTS})"
79-
sleep 20
84+
echo "Attempt $i: Package not yet installable, waiting 30s... (${i}/${MAX_ATTEMPTS})"
85+
sleep 30
8086
fi
8187
done
8288
echo "success=false" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)