Skip to content

Use shards subset code from conda#939

Open
dholth wants to merge 10 commits into
mainfrom
908-shards-from-conda
Open

Use shards subset code from conda#939
dholth wants to merge 10 commits into
mainfrom
908-shards-from-conda

Conversation

@dholth
Copy link
Copy Markdown
Contributor

@dholth dholth commented May 6, 2026

Description

Now that conda is getting a port of the conda-libmamba-solver shards fetcher, use the one that originates from conda.

I'd like to pass this in to the solver as a parameter, instead of having conda-libmamba-solver choose exactly which shards function it calls.

Fix #908

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@dholth dholth requested a review from a team as a code owner May 6, 2026 21:22
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 6, 2026
@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review May 6, 2026
@dholth dholth requested a review from ForgottenProgramme May 7, 2026 21:42
UpdateModifier,
)
from conda.common.path import PathType
from conda.gateways.shards import BuildRepodataSubset
Copy link
Copy Markdown
Contributor Author

@dholth dholth May 7, 2026

Choose a reason for hiding this comment

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

implies requirement for conda >=26.5 although, since it's only in typing block it doesn't cause errors for older conda

@travishathaway
Copy link
Copy Markdown
Contributor

travishathaway commented May 8, 2026

Hi @dholth,

I have one question about the implementation. Did you consider pulling what I call, "the ol' switcheroo"? By that I mean simply just swapping all of the modules verbatim to conda and then adding stubs to conda-libmamba-solver so that the imports continue to work for backwards compatibility purposes.

I was expecting to see a lot more removals in this pull request than there currently are. If we're not going to remove the sharded repodata implementation in this pull request, I'd like to see us at least come up with a plan for removing it in the future.

I'm not against the dependency injection strategy. I just wonder if we can't make this even simpler.

Also, I think this is being blocked by this pull request, right? I wouldn't want to merge this while CONDA_REF is point at a feature branch.

@dholth
Copy link
Copy Markdown
Contributor Author

dholth commented May 8, 2026

Hi @dholth,

I have one question about the implementation. Did you consider pulling what I call, "the ol' switcheroo"? By that I mean simply just swapping all of the modules verbatim to conda and then adding stubs to conda-libmamba-solver so that the imports continue to work for backwards compatibility purposes.

I was expecting to see a lot more removals in this pull request than there currently are. If we're not going to remove the sharded repodata implementation in this pull request, I'd like to see us at least come up with a plan for removing it in the future.

I'm not against the dependency injection strategy. I just wonder if we can't make this even simpler.

Also, I think this is being blocked by this pull request, right? I wouldn't want to merge this while CONDA_REF is point at a feature branch.

Since this implementation does not import new symbols from conda at runtime (only in the type checking block), we have simplified the release sequencing problem. We could release this today or after the necessary conda release without breaking anything and without requiring conda > 26.5.

(We do run conda-libmamba-solver's tests against the related CONDA_REF so that it will call us passing its own shards implementation, so that we know that both pieces work together.)

This isn't the main reason I've pursued this strategy but it is a side effect. I want to let conda choose which repodata subset function it passes to the solver.

We would certainly plan on removing conda-libmamba-solver's shards implementation no later than the next release after this one.

@dholth dholth requested review from travishathaway and removed request for ForgottenProgramme May 8, 2026 14:22
Comment thread .github/workflows/tests.yml Outdated
@travishathaway
Copy link
Copy Markdown
Contributor

@dholth,

That all makes sense. I think this is a fine approach then.

Are we waiting for main to be updated in conda/conda before we can merge this?

@dholth dholth force-pushed the 908-shards-from-conda branch from adbbc14 to c3b9c11 Compare May 12, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

Replace shard stack with imports from conda

3 participants