Add logging level for conan-center hook
This PR is an extension of CONAN_LOGGING_LEVEL, but for Conan Center hook.
For local development we may not want to see all info, only warning and error are enough.
It's related to #279. Unfortunately we don't have a hook post-command yet, but we can silence minor messages at least.
/cc @ericriff
Well, we already have CONAN_HOOK_ERROR_LEVEL. But we can re-use them for other hooks too, it's just because we don't have a separated feature for it on Conan. I just want to keep it separated from CONAN_LOGGING_LEVEL. Because if I work developing recipes for my company and cci at same machine, I'll want to mute conan-center hook messages, but keeping regular Conan client messages working.
In C3i we should probably use WARNING level, right? That way when we tell a user that the recipe is broken because of the hook, they will see only the warnings/errors, but not all the hooks that have passed. Am I right?
@jgsogo Yes, in CCI it would be nice using WARNING as default level. I don't know if we should enable it by default or CCI should add CONAN_HOOK_LOGGING_LEVEL
I would like WARNING level per default locally too. I think that at this point all the OKs are kinda spam in the logs 🙈
I needed to force Pylint 2.10, because 2.11 changed something which broke hooks. I did a quick read on Pylint repo and there are more issues related to 2.11. My suggestion is using 2.10 for now and wait for a solution (maybe 2.12).
About logging levels, I think we want 2 things.
- less verbose logs when building locally, which can be accomplished by this pr
- increase the severity of an error (aka introduce
-Werror): I think it would be useful for c3i to mark warnings as errors. Right now, we have some checks marked as warnings because marking them as error would cause too many builds to fail. To that, I propose to only increase the severity if the name of the recipe is the same as the recipe is being built (and not a dependency).
I think it would be useful for c3i to mark warnings as errors.
It will break many recipes in Conan Center. You are a Conan expert, know about the errors and warnings, but for new contributors, it can be a block when submitting their first PR.
It's a double edged sword. I think we should think about ways to give attention to the warnings then. Right now, c3i hides them. It would be useful to have them available somewhere such that people/reviewers can propose fixes for them.
I would like to see that the CCI bot is outputting all hook warnings as a comment in the PR, but not blocking the PR because of it
I would like to see that the CCI bot is outputting all hook warnings as a comment in the PR, but not blocking the PR because of it
yes, it's possible, we were thinking how to implement it in CI. but as we run initial export + parallel builds, it has to be gathered in multiple places and then somehow represented in the readable way, which is not too annoying.
What is the current status of this?
Need to re-visit