Skip to content

Fetch uv from Astral mirror during self-update#18682

Open
zsol wants to merge 1 commit intomainfrom
zsol/jj-llkyowxrwzll
Open

Fetch uv from Astral mirror during self-update#18682
zsol wants to merge 1 commit intomainfrom
zsol/jj-llkyowxrwzll

Conversation

@zsol
Copy link
Copy Markdown
Member

@zsol zsol commented Mar 23, 2026

Following #18679, this PR makes uv fetch the installer script from the Astral mirror (similarly to how we fetch the ndjson for version metadata), and then run the script directly, emulating what axoupdater would do.

This completes the uv self update (uv itself) item in #18503

Test Plan

Added tests, plus did this manually:

❯ cargo build --features self-update
[...]
❯ cp target/debug/uv ~/.local/bin/
❯ uv self update 0.11.0 -vv
DEBUG uv 0.11.1 (aarch64-apple-darwin)
DEBUG Using request connect timeout of 10s and read timeout of 30s
info: Checking for updates...
DEBUG Using official public self-update path
DEBUG Using request connect timeout of 10s and read timeout of 30s
TRACE Handling request for https://releases.astral.sh/github/versions/main/v1/uv.ndjson with authentication policy auto
TRACE Request for https://releases.astral.sh/github/versions/main/v1/uv.ndjson is unauthenticated, checking cache
TRACE No credentials in cache for URL https://releases.astral.sh/github/versions/main/v1/uv.ndjson
TRACE Attempting unauthenticated request for https://releases.astral.sh/github/versions/main/v1/uv.ndjson
DEBUG Resolved self-update target to `uv==0.11.0`
DEBUG Using request connect timeout of 10s and read timeout of 30s
TRACE Handling request for https://releases.astral.sh/github/uv/releases/download/0.11.0/uv-installer.sh with authentication policy auto
TRACE Request for https://releases.astral.sh/github/uv/releases/download/0.11.0/uv-installer.sh is unauthenticated, checking cache
TRACE No credentials in cache for URL https://releases.astral.sh/github/uv/releases/download/0.11.0/uv-installer.sh
TRACE Attempting unauthenticated request for https://releases.astral.sh/github/uv/releases/download/0.11.0/uv-installer.sh
success: Downgraded uv from v0.11.1 to v0.11.0! https://github.com/astral-sh/uv/releases/tag/0.11.0

@zsol zsol force-pushed the zsol/jj-qrmtulwxsrtv branch from 9d38982 to 96394b6 Compare March 23, 2026 19:32
@zsol zsol force-pushed the zsol/jj-llkyowxrwzll branch from 3b4f6a0 to 239998b Compare March 23, 2026 19:32
@zsol zsol force-pushed the zsol/jj-qrmtulwxsrtv branch from 96394b6 to d8f7c8b Compare March 23, 2026 19:43
@zsol zsol force-pushed the zsol/jj-llkyowxrwzll branch from 239998b to 8acffff Compare March 23, 2026 19:43
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 23, 2026

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing zsol/jj-llkyowxrwzll (bc4f5ce) with main (944f009)

Open in CodSpeed

@zsol zsol force-pushed the zsol/jj-llkyowxrwzll branch from 8acffff to 4ada275 Compare March 24, 2026 11:39
@zsol zsol force-pushed the zsol/jj-qrmtulwxsrtv branch from d8f7c8b to 2a89699 Compare March 24, 2026 11:39
@zsol zsol changed the title Mirror official uv self-update installer downloads Fetch uv from Astral mirror during self-update Mar 24, 2026
@zsol zsol force-pushed the zsol/jj-llkyowxrwzll branch 3 times, most recently from 3b21eae to fe00f2c Compare March 26, 2026 11:39
@zsol zsol requested a review from Gankra March 26, 2026 11:39
@zsol zsol marked this pull request as ready for review March 26, 2026 11:40
Base automatically changed from zsol/jj-qrmtulwxsrtv to main March 26, 2026 11:42
@zsol zsol force-pushed the zsol/jj-llkyowxrwzll branch 2 times, most recently from 3eaa728 to 7605d0f Compare March 26, 2026 15:39
@zsol zsol force-pushed the zsol/jj-llkyowxrwzll branch from 7605d0f to bc4f5ce Compare March 26, 2026 15:53
@konstin konstin added the enhancement New feature or improvement to existing functionality label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants