Skip to content

Route proxy artifacts through physical endpoints - #20214

Open
zsol wants to merge 3 commits into
mainfrom
zsol/proxy-index-07-artifact-routing
Open

Route proxy artifacts through physical endpoints#20214
zsol wants to merge 3 commits into
mainfrom
zsol/proxy-index-07-artifact-routing

Conversation

@zsol

@zsol zsol commented Jul 7, 2026

Copy link
Copy Markdown
Member

Existing locks retain canonical registry artifact identities. When that canonical index is routed through a proxy, uv needs to rediscover the exact locked file through the current physical endpoint; otherwise metadata requests and downloads can bypass the proxy or use the wrong cache shard.

This PR adds locked artifact rediscovery by exact filename and digest. When the proxy advertises one of the locked hashes, uv uses the normal metadata path. If it does not advertise a comparable hash, uv streams the full wheel to a temporary file and validates it against the lock before parsing its metadata. The canonical index owns the resolution and lock identity, while the physical endpoint takes care of request URLs, authentication, status and cache-control policy, capability attribution, redirects, and errors.

Artifact reads and writes use only the current physical endpoint’s cache shard (for now; this might be a future optimization opportunity, or rendered moot by #19693). Direct indexes retain their existing behavior because their physical and canonical endpoints are identical. Since proxies are not configurable as of this PR, all indexes are direct.

URL-form proxy indexes can satisfy existing locks but remain excluded from fresh resolution. Lock canonicalization, artifact URL mapping, and proxy configuration remain separate follow-ups.

@zsol
zsol force-pushed the zsol/proxy-index-07-artifact-routing branch from 8118113 to de6872f Compare July 23, 2026 13:22
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