Skip to content

Remove raw URL cache keys - #2794

Closed
zaniebot wants to merge 1 commit into
zaniebot/pep508-unsafe-url-20261015from
zaniebot/safe-url-cache-key-20261015
Closed

zaniebot wants to merge 1 commit into
zaniebot/pep508-unsafe-url-20261015from
zaniebot/safe-url-cache-key-20261015

Conversation

@zaniebot

Copy link
Copy Markdown
Collaborator

url::Url implements CacheKey, allowing raw URLs to be used directly as cache keys. Remove that implementation in favor of SafeUrl. Require CacheKey only when caching a Requirement, so the unsafe-url feature can still parse requirements with url::Url without making those requirements cacheable.

Stacked on astral-sh#22623.

@zaniebot
zaniebot deployed to automations October 15, 2026 22:24 — with GitHub Actions Active
@astral-automations-bot astral-automations-bot Bot added the internal A refactor or improvement that is not user-facing label Oct 15, 2026
@zaniebot
zaniebot added this pull request to stack #2797 October 15, 2026 22:28
@codspeed

codspeed Bot commented Oct 15, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 13.5%

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 68 untouched benchmarks
⏩ 35 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ ⚠️ Simulation discover_workspace_from_all_members_with_excludes 141.6 ms 163.6 ms -13.5%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing zaniebot/safe-url-cache-key-20261015 (66eddd8) with zaniebot/pep508-unsafe-url-20261015 (6051341)

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@zanieb
zanieb marked this pull request as ready for review October 16, 2026 02:07
@astral-automations-bot

Copy link
Copy Markdown

Promoted to #22629.

@zaniebot
zaniebot removed this pull request from stack #2797 October 16, 2026 02:36
zanieb pushed a commit to astral-sh/uv that referenced this pull request Oct 16, 2026
Signed `--find-links` URLs that differ only in a redacted query
parameter value share a cache filename. Fetching one can overwrite the
other's cached listing, causing cache misses, including offline. Hash
the complete URL to give the listings separate cache entries.

Stacked on astral-sh#2794.

Co-authored-by: Zanie Blue <[email protected]>

This branch was successfully deployed

1 active deployment
automations — 66eddd82 Deployed Oct 15, 2026 by zaniebot via review-code-quality / code quality review #10482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants