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

Import errors in default plugins are difficult to find #3408

Open
jholecek-rh opened this issue May 11, 2022 · 0 comments
Open

Import errors in default plugins are difficult to find #3408

jholecek-rh opened this issue May 11, 2022 · 0 comments

Comments

@jholecek-rh
Copy link
Contributor

This is a follow-up to #3405.

I was kind of lucky to find the root cause of #3405. insights run has no command line arguments that would reveal why there was a missing dependency. The reason is that insights.specs.default is effectively loaded by insights.load_default_plugins() with continue_on_error=True outside of the -p imports.

I'm curious what is the purpose of hardcoded default plugins. I view insights-core as a generic engine that enables plugins to analyze application-specific data. The hardcoded default packages will be inevitably irrelevant for applications that insights-core is not aware of (e.g. OCP4 rules). Application-specific defaults can be provided in the configuration file.

Assuming there are reasons to load the hardcoded default plugins, I wonder why they are imported with continue_on_error=True. I would expect that the plugins, being part of insights-core, should always be importable in a properly installed environment. It would do no harm to load them with continue_on_error=False, plus it would make troubleshooting easier should they fail to import in a particular environment (e.g. a corrupted one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant