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

Error or warning? Should we load channels listed in the installed packages? #1924

Open
jaimergp opened this issue Sep 13, 2022 · 3 comments
Open
Assignees
Labels
type::bug Something isn't working where::libsolv

Comments

@jaimergp
Copy link
Contributor

Let's say we have the following situation:

  1. condarc says channels: [defaults]
  2. The user created an environment with mamba create -n my_env conda-forge::xz python. As a result, most packages come from defaults, but xz comes from conda-forge.
  3. In a future step, the user installs something else on my_env, without specifying conda-forge as a channel; e.g. conda install pytest

In this situation, libmamba will print a red error message to stderr:

libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.

The message is accurate, because xz might have an update on conda-forge but we can't tell because the user didn't include conda-forge in the channel list. Interestingly, this doesn't lead to an actual error. It's more of a (too loud?) warning.

We can avoid this message by making sure that the channels returned by PrefixData are also included in the repodata download list. See PR for conda-libmamba-solver here as a potential implementation idea for mamba.

The question is more along of the lines of: should we actually do this? conda/conda source does mention this in the comments, raising concerns about expired tokens or auth. If we do it, is it going to imply too much of an overhead? Is it really necessary?

The other question is whether the libmamba error message below should be downgraded to a warning instead, to cause less alarming feedback from users.

LOG_ERROR << "Selected channel specific (or force-reinstall) job, but "
"package is not available from channel. Solve job will fail.";

Thanks!

@jaimergp
Copy link
Contributor Author

Is it safe to assume that this warning is now gone after #2433? @AntoinePrv

@AntoinePrv
Copy link
Member

Looks like the current behavior is that the channel is not reloaded (leading to update/install not fetching this data), and there is no warning about it.
Installing new packages seems to work if there is no conflict with the existing one.
Updates do not fetch more recent data from that channel leading to a potential noop.

Not sure what should be the desired behavior, probably reloading that channel, and including it in the solv data. Atlernatively we should write some message (maybe not through the log).

@AntoinePrv AntoinePrv self-assigned this Apr 25, 2023
@jaimergp
Copy link
Contributor Author

For context:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug Something isn't working where::libsolv
Projects
None yet
Development

No branches or pull requests

3 participants