Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for libmamba v2 #457

Merged
merged 168 commits into from
Oct 18, 2024
Merged

Refactor for libmamba v2 #457

merged 168 commits into from
Oct 18, 2024

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Mar 26, 2024

Description

Adds compatibility for libmamba v2, which enables a few refactors (see below). Supersedes conda/conda#414.

Progress:

  • Refactor index helpers
  • Refactor repoquery
  • Refactor solver
  • Refactor conflict reports
  • Pass all tests
  • Polish and clean up

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?

Summary of changes

  • Deprecate CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED. No longer needed with v2. Closes pip-integration: --dry-run still installs with pip conda#411
  • Added typing for all methods and functions
  • Added time_recorder decorator for metadata collection and solving loop
  • Removed state.BaseIndexHelper. We just have our index.IndexHelper now
  • The libmamba v1 pool (collection of repos, where a repo represents a loaded repodata.json) is now a database of RepoInfo objects.
  • Do use current_repodata.json if explicitly set in CLI
  • Move to Ruff for pre-commit linting & formatting
  • Logging from libsolv has a HUGE overhead now because it goes from C to C++ to Python to logging to stdout instead of C -> stdout. To enable libsolv verbosity, an extra environment variable CONDA_LIBMAMBA_SOLVER_DEBUG_LIBSOLV is required.
  • allow_uninstall was previously set to false (only true for conda remove), and we set it up for individual solver jobs involving updates or conflicts. With v2, we have individual control over what to "Keep" instead of drop. This required marking important updates as keepers instead. Otherwise they would be uninstalled.
  • Other changes in the test suite discussed in Amend test suite for compatibility with libmamba v2 conda#13784

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Mar 26, 2024
@jaimergp
Copy link
Contributor Author

pre-commit.ci autofix

@jaimergp jaimergp closed this Oct 14, 2024
@jaimergp jaimergp reopened this Oct 14, 2024
@jaimergp jaimergp closed this Oct 14, 2024
@jaimergp jaimergp reopened this Oct 14, 2024
@jaimergp jaimergp changed the title Refactor for libmamba v2 (WIP) Refactor for libmamba v2 Oct 15, 2024
@jaimergp
Copy link
Contributor Author

@conda/conda-libmamba-solver, I think this is ready for merge now. Not sure if we want to do this for 24.11 right away, in which case I would advocate for a rc release sometime soon, accumulate feedback, and then proceed with 24.11 final by mid-end November? If we need to do some more work on the 24.9.x series we can always start a branch later, but I think 24.11 should be libmamba 2+ only. WDYT?

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@jaimergp
Copy link
Contributor Author

Once conda/conda#13784 is merged, I can revert the CI changes so we point to conda/conda@main again.

Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @jaimergp 🥳

@jaimergp jaimergp merged commit cbc9f1f into main Oct 18, 2024
59 checks passed
@jaimergp jaimergp deleted the try-libmamba-2a3 branch October 18, 2024 13:20
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
Archived in project
3 participants