Skip to content

perf(uv): deduplicate wheel installs#1352

Open
zbarsky-openai wants to merge 2 commits into
aspect-build:mainfrom
zbarsky-openai:zbarsky/deduplicate-wheel-installs
Open

perf(uv): deduplicate wheel installs#1352
zbarsky-openai wants to merge 2 commits into
aspect-build:mainfrom
zbarsky-openai:zbarsky/deduplicate-wheel-installs

Conversation

@zbarsky-openai

Copy link
Copy Markdown
Contributor

Depends on #1348.

Summary

  • Share concrete wheel-variant install repositories across lock universes when metadata, ordered wheel candidates, and exclusions match.
  • Keep patched variants project-local and preserve order-sensitive wheel selection.
  • Add focused coverage for ordering, exclusions, and patched variants.

Validation

  • bazel run //:buildifier -- /tmp/rules-py-dedup/uv/private/extension/defs.bzl /tmp/rules-py-dedup/uv/private/extension/test_defs.bzl /tmp/rules-py-dedup/uv/private/whl_install/repository.bzl
  • bazel test //uv/private/extension:shared_whl_variant_key_tests

@CLAassistant

CLAassistant commented Jul 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@tamird tamird left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contains the full lazy-metadata change and currently repeats its causal CI failures. There is also an integration hole with the approved exclude_glob API: wheel variants receive the filter, but an sdist fallback selected through the public repository does not. Please extract/rebase after #1348, preserve the filter for both install paths, and add a real two-lock dedupe plus sdist-filter regression.

"metadata_directory": install_cfg.metadata_directory,
"name": install_id,
"sbuild": install_cfg.sbuild,
"variant_installs": json.encode(variant_installs),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exclude_glob is forwarded to each concrete wheel variant above, but it is absent from this public-selector install_kwargs. If resolution falls back to an sdist, the selected install silently keeps files the caller explicitly excluded. Please forward the filter here too and exercise an actual sdist fallback; the current key tests fabricate exclude_glob and do not prove the selected install is filtered.

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.

3 participants