-
Notifications
You must be signed in to change notification settings - Fork 353
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
fix: add warning when using defaults #3434
Conversation
I missed the conversation at the summit, so I cannot comment on that. I think that it makes sense for us to help mamba users, and warning them that using certain channels may incur costs as per their TOS makes sense IMO. However, conda is a client of this library and we should probably make sure that they can disable this warning if they decided to. |
libmamba/src/api/channel_loader.cpp
Outdated
@@ -63,6 +63,10 @@ namespace mamba | |||
{ | |||
for (const auto& platform : channel.platforms()) | |||
{ | |||
if (channel.platform_url(platform).host() == "repo.anaconda.com") { | |||
spdlog::warn("This is a commercial channel hosted by Anaconda.com. Please make sure you understand the TOS."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use LOG_WARNING
instead and avoid including <iostream>
.
I think having something via the |
The |
5a9b863
to
2c3fb59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need a way to deactivate this warning. I would go for a full configurable option (rc, env and public API exposed to Python) so that clients can choose how they disable it.
How would you best do that? |
Let's remove the test for now, there are some issues with the capture and redirection of stdout and stderr that are orthogonal to this PR. |
See #3440. |
be2cde0
to
ff2323e
Compare
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Hind Montassif <hind.montassif@gmail.com>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
ded04c4
to
2630bbd
Compare
fa3ced0
to
c847160
Compare
c847160
to
79ad706
Compare
Following all the drama about Anaconda's aggressive behavior towards users who are using the defaults channel (discussed at the NumFOCUS summit) we came up with the plan to at least add a warning.
I had a quick go at adding a warning when using defaults.
We should discuss what the UX should be like:
.condarc
settingy/n
prompt, after which we would append a value to the.condarc
file.Which option would you all prefer?