Skip to content

Start the mirror of unref-pre-commit again until it has the release - #286

Merged
Apakottur merged 3 commits into
mainfrom
wait-for-pypi-simple-index
Nov 22, 2026
Merged

Apakottur merged 3 commits into
mainfrom
wait-for-pypi-simple-index

Conversation

@Apakottur

@Apakottur Apakottur commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

The release of v0.5.1 failed in "Update the version": the mirror of unref-pre-commit failed to lock 0.5.1, as PyPI's simple index did not name it yet, and the release gave up waiting for the tag after 10 minutes. Apakottur/unref-pre-commit#3 makes the mirror retry uv lock for up to 12 minutes. This makes the release side consistent too, and moves its waits from bash to scripts/mirror_release.py:

  • It waits for the release on PyPI, as before.
  • The mirror finds new releases through PyPI's JSON API at /pypi/unref/json, a different cached page from the one the release waits on. If it is stale, the mirror succeeds without a tag. The script starts the mirror again whenever none is running and the tag is still missing.
  • The wait for the tag is 25 minutes, longer than the mirror's retries. Each attempt is logged.

The checkout and uv setup move to the start of the job so the script can run. Tested locally against the real APIs: the script exits at once for 0.5.1, which PyPI and unref-pre-commit have, and the PyPI wait gives up after its attempts for a version that does not exist. Starting the mirror was not tested, as it would start a real run.

…ref-pre-commit

The mirror runs uv lock, which reads the simple index. The JSON API named
v0.5.1 before the simple index did, so the mirror failed to lock it.

Assisted-by: Claude:claude-opus-5-5
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Performance

Time to check CPython v3.15.0: the median of 15 runs of each binary, run in turns.

Cores Base Head Change
Single core 1.40s 1.41s +0.8%
Multi core 0.96s 0.99s +2.2%

Ecosystem

Findings on 19 projects: none changed.

The mirror finds the release through PyPI's JSON API, which can name it
later than the step that waits for PyPI saw it, and then succeeds without
a tag. The release now starts the mirror again whenever none is running
and the tag is still missing, for up to 25 minutes, as the mirror retries
uv lock for up to 12. The wait for PyPI is back to the JSON API.

Assisted-by: Claude:claude-opus-5-5
@Apakottur Apakottur changed the title Wait for the release in PyPI's simple index before mirroring it to unref-pre-commit Start the mirror of unref-pre-commit again until it has the release Nov 22, 2026
…cript

The loops in bash were hard to read. scripts/mirror_release.py waits for
PyPI, then for the tag in unref-pre-commit, starting the mirror again
whenever none is running, and logs each attempt.

Assisted-by: Claude:claude-opus-5-5
@Apakottur
Apakottur merged commit 7675ed5 into main Nov 22, 2026
8 checks passed
@Apakottur
Apakottur deleted the wait-for-pypi-simple-index branch November 22, 2026 12:06
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