conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
142 stars 46 forks source link

Set channel priority to strict, print config info #693

Closed nkaretnikov closed 8 months ago

nkaretnikov commented 8 months ago

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:

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

Fixes #359, fixes #659.

netlify[bot] commented 8 months ago

Deploy Preview for kaleidoscopic-dango-0cf31d ready!

Name Link
Latest commit 973a2a49e2a2120010619eb9585a2859de6f6134
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 commented 8 months ago

"Place a bound on docker-py" - this commit is a workaround for a CI issue, might need to be removed before merge. See #689.

nkaretnikov commented 8 months ago

This is ready for review. Tested manually as well. See https://github.com/conda-incubator/conda-store/pull/693#issuecomment-1849389728 before merge.