Skip to content

Fix: PyPI Eventual Consistency Race Condition in CI#15

Merged
arvarik merged 1 commit into
mainfrom
fix/pypi-download-race
Apr 25, 2026
Merged

Fix: PyPI Eventual Consistency Race Condition in CI#15
arvarik merged 1 commit into
mainfrom
fix/pypi-download-race

Conversation

@arvarik
Copy link
Copy Markdown
Owner

@arvarik arvarik commented Apr 25, 2026

Summary

Fixes a CI race condition where the Wait for PyPI availability step would exit too early because the bdist_wheel finishes uploading slightly before the sdist.

Details

  • The previous logic just checked if https://pypi.org/pypi/gemstack/VERSION/json returned an HTTP 200.
  • However, PyPI is eventually consistent, and the urls array might not contain the sdist immediately.
  • When the script then tries to extract the sdist URL via Python, it fails with a StopIteration or JSON decode error because PYPI_JSON evaluation gets mangled.
  • Fix: The wait loop now strictly parses the JSON to confirm the sdist package actually exists in the urls array before proceeding. We also use a temporary pypi.json file instead of bash echo to prevent string-escaping corruption of JSON control characters.

Next Steps

Once this is merged, I will tag v1.1.7 so the fixed release pipeline can execute.

@arvarik arvarik merged commit 9177d2d into main Apr 25, 2026
2 checks passed
@arvarik arvarik deleted the fix/pypi-download-race branch April 25, 2026 01:53
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