Add logging level for conan-center hook#280
Conversation
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
jgsogo
left a comment
There was a problem hiding this comment.
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 |
jgsogo
left a comment
There was a problem hiding this comment.
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 <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
| self.assertNotIn("[FPIC MANAGEMENT (KB-H007)] OK", output) | ||
|
|
||
| def test_os_rename_warning(self): |
There was a problem hiding this comment.
| 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): |
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
|
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