Skip to content

fix(ci): poll PyPI JSON API for availability check#348

Merged
jimisola merged 1 commit intomainfrom
fix/ci-pypi-json-availability-check
Apr 19, 2026
Merged

fix(ci): poll PyPI JSON API for availability check#348
jimisola merged 1 commit intomainfrom
fix/ci-pypi-json-availability-check

Conversation

@jimisola
Copy link
Copy Markdown
Member

Summary

  • Replace pip install --dry-run --no-cache-dir with curl against the PyPI JSON API (/pypi/{name}/{version}/json) in the "Wait for PyPI availability" step of release_prod.yml.

Root cause

PR #341 intended this switch but landed with --no-cache-dir only. That was insufficient: pip resolves through the Simple Index, which is served via Fastly and can return stale /simple/reqstool/ pages to a given POP for minutes after upload. --no-cache-dir disables pip's on-disk cache but does not bypass the upstream HTTP/CDN cache.

Observed in run 24624666126 — release of 0.9.0 polled 90× over 15 minutes and never saw the package, even though `GET https://pypi.org/pypi/reqstool/0.9.0/json\` returns 200 right now.

The JSON API is the canonical, cache-friendly endpoint for "does this version exist".

Test plan

  • Next release: `publish-image-to-ghcr` → "Wait for PyPI availability" transitions to "is available on PyPI" within a few attempts
  • If needed, re-dispatch the 0.9.0 release via `workflow_dispatch` (existing `skip-existing: true` on the publish action handles the already-uploaded case)

Replace `pip install --dry-run --no-cache-dir` with a curl request to
the PyPI JSON API. pip resolves against the Simple Index, which is
served via Fastly and can return stale `/simple/reqstool/` pages for
minutes after upload. `--no-cache-dir` only disables pip's on-disk
cache; it does not bypass the upstream CDN cache. The JSON endpoint
`/pypi/{name}/{version}/json` is the canonical, cache-friendly way to
check whether a specific version exists.

Observed failure: run 24624666126 (release of 0.9.0) polled for the
full 15 minutes and never saw the package, even though the JSON API
returns 200 for reqstool 0.9.0.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola merged commit a467d3e into main Apr 19, 2026
6 checks passed
@jimisola jimisola deleted the fix/ci-pypi-json-availability-check branch April 19, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant