Skip to content

Retry uv lock until PyPI's simple index names the release - #3

Merged
Apakottur merged 1 commit into
mainfrom
retry-uv-lock
Nov 22, 2026
Merged

Apakottur merged 1 commit into
mainfrom
retry-uv-lock

Conversation

@Apakottur

Copy link
Copy Markdown
Owner

The mirror started by unref's release of v0.5.1 failed: PyPI's JSON API already named 0.5.1, but uv lock ran 21 seconds after the upload and the simple index it reads did not name it yet (run).

The simple index is cached for up to 10 minutes (cache-control: max-age=600), so uv lock is now retried every 15 seconds for up to 12 minutes, with --refresh-package unref so uv does not reuse its own cache of the index. Each failed attempt is logged with uv's error.

Tested locally: locking a version that does not exist retries and then raises, and locking 0.5.1 succeeds on the first attempt.

Goes with Apakottur/unref#286, which starts the mirror again from the release until the tag exists.

PyPI's JSON API named unref 0.5.1 before the simple index that uv lock
reads, so the mirror started by unref's release failed to lock it. The
index is cached for up to 10 minutes, so uv lock is retried for 12.

Assisted-by: Claude:claude-opus-5-5
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