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

Set channel priority to strict, print config info #693

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

nkaretnikov
Copy link
Contributor

@nkaretnikov nkaretnikov commented Dec 11, 2023

This PR sets the channel priority to strict to avoid issues during solves when multiple channels that were not specified are being used. This is done by passing the command line option --strict-channel-priority via the environment variable CONDA_FLAGS, which is used by conda-lock, which is a library conda-store uses to solve dependencies.

CONDA_FLAGS is used because it's a method of passing options that's local to conda-lock as opposed to editing global conda configuration files. Editing user configuration files may lead to unexpected issues in contexts where conda-store is used in standalone mode. Those configuration files affect how conda works outside of conda-store, which might be important to end users.

From the documentation at https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html:

With strict channel priority, packages in lower priority channels are not considered if a package with the same name
appears in a higher priority channel.

Additionally, this PR adds code that prints useful system information related to conda configuration before the package solving process. This is useful for debugging. The commands used are:

  • conda/mamba info, depending on the value of conda_store.conda_command
  • conda config --show
  • conda config --show-sources.

Note that the latter two commands are not supported by mamba, which is why conda is used.

Fixes #359, fixes #659.

Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for kaleidoscopic-dango-0cf31d ready!

Name Link
🔨 Latest commit 973a2a4
🔍 Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/65809a3f2cf0a400085656a2
😎 Deploy Preview https://deploy-preview-693--kaleidoscopic-dango-0cf31d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nkaretnikov

This comment was marked as outdated.

@nkaretnikov nkaretnikov marked this pull request as ready for review December 11, 2023 07:18
@nkaretnikov

This comment was marked as outdated.

Copy link
Collaborator

@trallard trallard left a comment

Choose a reason for hiding this comment

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

Thanks @nkaretnikov - I left a few comments and questions.
I generally do not like to use print for what should be logged or streamed, so unless there is a strong reason to use print this should be changed

Copy link
Collaborator

@trallard trallard left a comment

Choose a reason for hiding this comment

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

Thank you, this LGTM 🚀 merging now!

@trallard trallard merged commit de5c7b4 into conda-incubator:main Dec 20, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done 💪🏾
2 participants