Add information about Log Detective runs into API#3075
Add information about Log Detective runs into API#3075jpodivin wants to merge 1 commit intopackit:mainfrom
Conversation
d8ff310 to
7542ca9
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a new API for Log Detective runs, including new endpoints to retrieve details for individual runs and run groups, and integrates Log Detective run information into the existing Copr and Koji build APIs. It also updates URL generation to support string IDs for Log Detective results. The review comments suggest several improvements, including refactoring duplicated code for retrieving Log Detective runs into a shared utility function, adhering to the logging style guide by initializing loggers with logging.getLogger(__name__), removing an unused config variable, improving the specificity of an error message, ensuring consistent enum handling by explicitly using .value, correcting an inaccurate docstring, and removing redundant type casting for an integer ID parameter.
| ) | ||
| from packit_service.service.api.utils import get_project_info_from_build, response_maker | ||
|
|
||
| logger = logging.getLogger("packit_service") |
There was a problem hiding this comment.
According to the repository's style guide (lines 494-498), loggers must be initialized with logging.getLogger(__name__).
| logger = logging.getLogger("packit_service") | |
| logger = logging.getLogger(__name__) |
References
- Logger must be initialized from
logginglibrary with:logging.getLogger(__name__)(link)
There was a problem hiding this comment.
Technically correct, but in this case the established pattern is something else.
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 49s |
6707d97 to
9ef217b
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 58s |
9ef217b to
b17635e
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 57s |
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
b17635e to
afa67fd
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 59s |
This also add the
get_logdetective_info_urlhelper function. This isn't immediately useful, but it will be necessary for linking results.RELEASE NOTES BEGIN
Log Detective results are now displayed on the dashboard.
RELEASE NOTES END