Skip to content

Group VCS source metadata in VcsUrl - #22645

Merged
zanieb merged 1 commit into
zaniebot/direct-url-reader-20261016from
zaniebot/direct-url-vcs-20261016
Oct 16, 2026
Merged

zanieb merged 1 commit into
zaniebot/direct-url-reader-20261016from
zaniebot/direct-url-vcs-20261016

Conversation

@astral-automations-bot

Copy link
Copy Markdown
Contributor

DirectUrl stores a VCS repository URL and its metadata as separate fields, and both Git source conversions construct the same metadata. Group them in VcsUrl and share the conversion from GitUrl. Keep the serialized direct_url.json shape and URL parsing behavior unchanged.

Stacked on #22644.

@codspeed

codspeed Bot commented Oct 16, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 7.78%

⚠️ 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

⚡ 2 improved benchmarks
✅ 67 untouched benchmarks
⏩ 54 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ ⚠️ Simulation discover_workspace_from_all_members_with_excludes 165.6 ms 150.6 ms +9.92%
⚡ ⚠️ Simulation discover_workspace_from_all_members 151.5 ms 143.4 ms +5.69%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing zaniebot/direct-url-vcs-20261016 (a067513) with main (64e2ac8)2

Open in CodSpeed

Footnotes

  1. 54 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. ↩

  2. No successful run was found on zaniebot/direct-url-reader-20261016 (2f16c64) during the generation of this report, so main (64e2ac8) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@zanieb
zanieb requested a review from zsol October 16, 2026 17:55
@zanieb
zanieb merged commit 4edb182 into main Oct 16, 2026
64 checks passed
@zanieb
zanieb deleted the zaniebot/direct-url-vcs-20261016 branch October 16, 2026 18:51
zanieb pushed a commit that referenced this pull request Oct 16, 2026
`DirectUrl` stores URLs as strings, so debug formatting can expose
passwords and signed query values, and persistence relies on callers
removing sensitive userinfo. Store the fields as `SafeUrl<Stripped>` to
mask passwords and recognized sensitive query values in debug output and
remove sensitive userinfo during serialization. Retain complete query
strings, including signed parameters, and a passwordless `git` username
for `git+ssh` and `git+https` URLs.

Parse VCS URLs with the prefix corresponding to their VCS kind,
retaining the accepted inputs and normalization used when reconstructing
installed metadata. Serialization omits the prefix from
`direct_url.json`.

Stacked on #22645.

Co-authored-by: zaniebot <[email protected]>

This branch was previously deployed

1 inactive deployment
automations — a0675132 Deployed Oct 16, 2026 by astral-automations-bot[bot] via review / security review #51364
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.

3 participants