-
Notifications
You must be signed in to change notification settings - Fork 46
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 logging level for conan-center hook #280
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
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.
Do we want to name the variable CONAN_HOOK...
when it is something that affects only to the hook named conan-center
?
Well, we already have |
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.
Yeah, the same pattern as CONAN_HOOK_ERROR_LEVEL
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 |
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
self.assertNotIn("[FPIC MANAGEMENT (KB-H007)] OK", output) | ||
|
||
def test_os_rename_warning(self): |
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.
self.assertNotIn("[FPIC MANAGEMENT (KB-H007)] OK", output) | |
def test_os_rename_warning(self): | |
self.assertNotIn("[FPIC MANAGEMENT (KB-H007)] OK", output) | |
with tools.environment_append({"CONAN_HOOK_LOGGING_LEVEL": "9001"}): # Over 9000 | |
output = self.conan(['create', '.', 'name/version@user/test']) | |
self.assertNotIn("ERROR: [PACKAGE LICENSE (KB-H012)]", output) | |
self.assertNotIn("WARN: [HEADER_ONLY, NO COPY SOURCE (KB-H005)]", output) | |
self.assertNotIn("[FPIC MANAGEMENT (KB-H007)] OK", output) | |
def test_os_rename_warning(self): |
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.
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
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.
|
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 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. |
What is the current status of this? |
Need to re-visit |
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