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

Add internal mechanism to broadcast messages via conda.notices module #13652

Open
2 of 7 tasks
travishathaway opened this issue Mar 5, 2024 · 2 comments
Open
2 of 7 tasks
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release source::anaconda created by members of Anaconda, Inc. type::feature request for a new feature or capability

Comments

@travishathaway
Copy link
Contributor

travishathaway commented Mar 5, 2024

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

The notices feature in conda was originally envisioned as being tightly coupled with retrieving notices from channels (either remote or local). But, we could also make this more generic by allowing other parts of the code in conda to broadcast their own notices (e.g. conda update notices).

The idea is that other modules would broadcast a notice message that would be collected and then printed out at the end of the command.

Why is this needed?

The most immediate use case we have for this is a better way to print conda update notices for our users. Currently, these update notices are unaware whether they have been displayed before and can be quite repetitive unless the user disables them completely via the notify_outdated_conda setting.

What should happen?

  • Figure out how to broadcast messages that will be displayed later (write these to a file; set-up an internal messaging queue; etc.)
  • Update the conda.notices module to read from the above mentioned source to display them
  • Make sure we track what notices have been displayed and which have not

Optional (probably better to address in separate issues)

  • Implement this notice system for notifying outdated conda for classic solver
  • Implement this notice system for notifying outdated conda for libmamba solver
@travishathaway travishathaway added type::feature request for a new feature or capability source::anaconda created by members of Anaconda, Inc. backlog issue has been triaged but has not been earmarked for any upcoming release labels Mar 5, 2024
@travishathaway travishathaway changed the title Add internal mechanism to broadcast notices via conda.notices module Add internal mechanism to broadcast messages via conda.notices module Mar 5, 2024
@danpetry
Copy link

danpetry commented Mar 6, 2024

I had a use case that might be covered by this if it were expanded to apply to packages?

Full description and discussion here, as it's related to the solver, but in summary the use case would be:

A package variant depends on a virtual package. If the user requests this variant and the platform doesn't support it, currently they get a solver error. I’d like to give them this information in plain english, for less packaging-inclined folks. E.g. for a package depending on __CUDA >= 11.7: “Your CUDA version is 11.3, but the CUDA variant of somepackage requires drivers that support CUDA 11.7 and above. Please upgrade your system drivers. See https://docs.nvidia.com/deploy/cuda-compatibility/ for more information".

@travishathaway
Copy link
Contributor Author

@danpetry,

This is an applicable use case for this issue. These messages would need to be broadcasted from the solver. These could be categorized as recommendations that would be shown after the command finishes running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release source::anaconda created by members of Anaconda, Inc. type::feature request for a new feature or capability
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants