Skip to content

[proposal] New resolver configuration#938

Open
tiran wants to merge 1 commit intopython-wheel-build:mainfrom
tiran:proposal-new-resolver-config
Open

[proposal] New resolver configuration#938
tiran wants to merge 1 commit intopython-wheel-build:mainfrom
tiran:proposal-new-resolver-config

Conversation

@tiran
Copy link
Copy Markdown
Collaborator

@tiran tiran commented Feb 27, 2026

Add design proposal for new resolver configuration.

See: #937

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added a new "Proposals" section to the documentation featuring enhancement proposals.
    • Added documentation for a new package resolver and source configuration system with support for multiple provider profiles and variant-level overrides.

@tiran tiran requested a review from a team as a code owner February 27, 2026 11:06
@mergify mergify bot added the ci label Feb 27, 2026
@tiran tiran force-pushed the proposal-new-resolver-config branch 3 times, most recently from ceb5b48 to 071d46c Compare March 3, 2026 14:21
@dhellmann dhellmann requested a review from shifa-khan March 3, 2026 22:30
@dhellmann
Copy link
Copy Markdown
Member

@shifa-khan has been looking at one of the other tickets related to similar work.

@tiran
Copy link
Copy Markdown
Collaborator Author

tiran commented Mar 4, 2026

I have inspect our downstream repo. Most prepare_source and download_source hooks can be replaced by the new resolver and download configuration. More than half of the plugins will no longer be necessary.

  • aiter: gitlab-git
  • amdsmi: special case to pin package
  • aotriton: special case
  • bitsandbytes: github-download
  • deep_ep: gitlab-download
  • deep_gemm: gitlab-git
  • detectron2: gitlab-download
  • faiis-cpu: pypi-git
  • flashinfer_python: pypi-git
  • flashinfer_jit_cache: gitlab-git
  • kubeflow: gitlab-download
  • litellm: gitlab-download
  • llama_stack: gitlab-download
  • mlflow: gitlab-download
  • mlflow_skinny: gitlab-download
  • mlflow_tracing: gitlab-download
  • mlserver: gitlab-download
  • mlserver_lightgbm: gitlab-download
  • mlserver_sklearn: gitlab-download
  • mlserver_xgboost: gitlab-download
  • nixl: gitlab-download
  • nvidia_cudnn_frontend: gitlab-download
  • nvidia_riva-python: pypi-git
  • opencv-python: gitlab-git
  • pplx_kernels: gitlab-download
  • submodlib_py: gitlab-clone (upstream has tags, version map is no longer necessary)
  • tacozip: pypi-git
  • tensorflow: github-git
  • tensorflow_rocm: special case
  • tilelang: gitlab-git
  • torchao: gitlab-git
  • tpu_info: special case, version map
  • tritonclient: gitlab-download
  • vllm: gitlab-download / special case?
  • vllm_bart_plugin: gitlab-download
  • vllm_neuron: gitlab-git

@tiran tiran requested a review from rd4398 March 16, 2026 16:10
@tiran tiran force-pushed the proposal-new-resolver-config branch from 071d46c to 3356160 Compare March 16, 2026 16:11
- `resolver_dist.sdist_server_url` is replaced by `index_url` parameter.
All `pypi-*` profile support a custom index.
- `git_options.submodules` is not needed. Like pip, Fromager will always
clone all submodules.
Copy link
Copy Markdown
Contributor

@shifa-khan shifa-khan Mar 18, 2026

Choose a reason for hiding this comment

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

In our downstream, we have packages that explicitly need submodules=False and cases where submodules point to private repos or have broken URLs. These packages when migrated to YAML would deviate from current behavior. Do we have a workaround to address such cases?
For example, adding an optional submodules parameter with true as the default?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm curious, which package fails to build when submodules are enabled? Do you know? I was under the impression that engineers added submodules=False when the package did not need submodules.

Yes, we have a workaround: keep the Python plugin.

If we really need a submodules: false flag for several packages, then we could consider the feature in the future. I would like to start with a simple configuration (80/20 rules).

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.

Yeah, my bad - let me rephrase. We have packages (tacozip, tpu_info, vllm_neuron) that use submodules=False, which could be for optimization or maybe to avoid actual failures. There's also the future case where submodules might point to private repos or broken URLs. But as you said, keeping a plugin for those edge cases should work.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I investigated our downstream packages with submodules=False. None of the git repos have git submodules. xla has a .gitmodules file, but it is empty.

@shifa-khan
Copy link
Copy Markdown
Contributor

downstream has few plugins call ensure_pkg_info() in prepare_source as boilerplate. Git clones never have PKG-INFO, but build tools (like setuptools-scm) need it before building. Could the git-based providers (gitlab-git, github-git, pypi-git) handle this automatically?

Copy link
Copy Markdown
Collaborator Author

@tiran tiran left a comment

Choose a reason for hiding this comment

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

downstream has few plugins call ensure_pkg_info() in prepare_source as boilerplate. Git clones never have PKG-INFO, but build tools (like setuptools-scm) need it before building. Could the git-based providers (gitlab-git, github-git, pypi-git) handle this automatically?

Great point! Yes, this will be handled automatically in two ways:

  • Fromager already adds PKG-INFO to the final sdist. In some cases, the file is added too late for some PEP 517 hooks.
  • Fromager will add a .git_archival.txt file to clones. Lala is working on the feature in #961 / #962 . This works for all setuptools-scm cases.

I'll update the design with the PKG-INFO and .git_archival.txt details.

- `resolver_dist.sdist_server_url` is replaced by `index_url` parameter.
All `pypi-*` profile support a custom index.
- `git_options.submodules` is not needed. Like pip, Fromager will always
clone all submodules.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm curious, which package fails to build when submodules are enabled? Do you know? I was under the impression that engineers added submodules=False when the package did not need submodules.

Yes, we have a workaround: keep the Python plugin.

If we really need a submodules: false flag for several packages, then we could consider the feature in the future. I would like to start with a simple configuration (80/20 rules).

@tiran tiran force-pushed the proposal-new-resolver-config branch from 3356160 to 6559cd3 Compare March 20, 2026 11:00
@tiran
Copy link
Copy Markdown
Collaborator Author

tiran commented Mar 27, 2026

@Mergifyio rebase

Add design proposal for new resolver configuration.

See: python-wheel-build#937
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 27, 2026

rebase

✅ Branch has been successfully rebased

@tiran tiran force-pushed the proposal-new-resolver-config branch from 6559cd3 to 37d1bea Compare March 27, 2026 09:36
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

Documentation for "Fromager Enhancement Proposals" is introduced by creating a new proposals index page and linking it from the main documentation homepage. The first proposal documented specifies a new top-level source configuration system for the package resolver and source/sdist downloader with variant-level overrides and provider profiles.

Changes

Cohort / File(s) Summary
Documentation Homepage Integration
docs/index.rst
Added proposals/index.rst to the main documentation toctree under the "Development" section.
Proposals Documentation Structure
docs/proposals/index.rst
Created new landing page for proposals with a toctree entry for new-resolver-config.
New Resolver Configuration Proposal
docs/proposals/new-resolver-config.md
Added detailed proposal documentation for a new source configuration system supporting multiple provider profiles (PyPI sdist-only, prebuilt wheels, tarball downloads, git-based resolution, GitHub/GitLab cloning, and artifact downloads) with VCS URL schema, matcher factory patterns, and deprecation mappings for existing configuration keys.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A warren of proposals, now indexed with care,
New documents flourish in docs everywhere,
Configuration schemes in markdown laid plain,
The resolver hops forward, no friction or strain!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[proposal] New resolver configuration' directly describes the main change—adding a design proposal for a new resolver configuration system.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/proposals/new-resolver-config.md`:
- Line 9: Replace the incorrect verb in the sentence "This enhancement document
proposal a new approach to configure the package" by changing "proposal" to
"proposes" so the sentence reads "This enhancement document proposes a new
approach to configure the package"; update the single sentence in the
docs/proposals/new-resolver-config.md content where that exact phrase appears.
- Line 187: Replace the lowercase platform name "github" with the capitalized
"GitHub" in the phrase referring to the `release_artifact` parameter of the
`github` or `gitlab` provider so the documentation consistently uses the
official name; update the occurrence that mentions "github" (in the context of
`release_artifact` and provider descriptions) to "GitHub" while leaving code
identifiers/backticks intact if they must remain lowercase.
- Line 169: The comment contains a duplicated word "must" in the text "tag must
must v1.2+midstream.1.cpu"; edit that comment to remove the duplicate so it
reads "tag must v1.2+midstream.1.cpu" (preserve the rest of the comment and the
Version("1.2+midstream.1") example).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 26a9cf54-1ff6-456b-89d4-e20a9f61d2f0

📥 Commits

Reviewing files that changed from the base of the PR and between 9b399c8 and 37d1bea.

📒 Files selected for processing (3)
  • docs/index.rst
  • docs/proposals/index.rst
  • docs/proposals/new-resolver-config.md


## What

This enhancement document proposal a new approach to configure the package
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammar: "proposal" → "proposes".

The verb form is incorrect in this sentence.

📝 Proposed fix
-This enhancement document proposal a new approach to configure the package
+This enhancement document proposes a new approach to configure the package
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This enhancement document proposal a new approach to configure the package
This enhancement document proposes a new approach to configure the package
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proposals/new-resolver-config.md` at line 9, Replace the incorrect verb
in the sentence "This enhancement document proposal a new approach to configure
the package" by changing "proposal" to "proposes" so the sentence reads "This
enhancement document proposes a new approach to configure the package"; update
the single sentence in the docs/proposals/new-resolver-config.md content where
that exact phrase appears.



def matcher_factory_pat(ctx: context.WorkContext) -> re.Pattern | resolver.MatchFunction:
# tag must must v1.2+midstream.1.cpu and results in Version("1.2+midstream.1")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix duplicate word in comment.

The comment contains a duplicate word "must must".

📝 Proposed fix
-    # tag must must v1.2+midstream.1.cpu and results in Version("1.2+midstream.1")
+    # tag must match v1.2+midstream.1.cpu and results in Version("1.2+midstream.1")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# tag must must v1.2+midstream.1.cpu and results in Version("1.2+midstream.1")
# tag must match v1.2+midstream.1.cpu and results in Version("1.2+midstream.1")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proposals/new-resolver-config.md` at line 169, The comment contains a
duplicated word "must" in the text "tag must must v1.2+midstream.1.cpu"; edit
that comment to remove the duplicate so it reads "tag must v1.2+midstream.1.cpu"
(preserve the rest of the comment and the Version("1.2+midstream.1") example).

### Deprecations

- `download_source.url` is handled by `pypi-download` profile or
`release_artifact` parameter of `github` or `gitlab` provider
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Capitalize "GitHub" for consistency.

The official platform name should be capitalized as "GitHub" to match its usage elsewhere in the document.

📝 Proposed fix
-  `release_artifact` parameter of `github` or `gitlab` provider
+  `release_artifact` parameter of `GitHub` or `GitLab` provider
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
`release_artifact` parameter of `github` or `gitlab` provider
`release_artifact` parameter of `GitHub` or `GitLab` provider
🧰 Tools
🪛 LanguageTool

[uncategorized] ~187-~187: The official name of this software platform is spelled with a capital “H”.
Context: ...le or release_artifact parameter of github or gitlab provider - `download_sourc...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proposals/new-resolver-config.md` at line 187, Replace the lowercase
platform name "github" with the capitalized "GitHub" in the phrase referring to
the `release_artifact` parameter of the `github` or `gitlab` provider so the
documentation consistently uses the official name; update the occurrence that
mentions "github" (in the context of `release_artifact` and provider
descriptions) to "GitHub" while leaving code identifiers/backticks intact if
they must remain lowercase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants