-
Notifications
You must be signed in to change notification settings - Fork 56
Log detective results handler #2905
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
Log detective results handler #2905
Conversation
Summary of ChangesHello @jpodivin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a dedicated handler for Log Detective analysis results, streamlining the reporting and tracking of these events within the system. It establishes clear rules for translating Log Detective outcomes into commit statuses, integrates new metrics for better operational visibility, and refines existing code for improved readability and maintainability. The changes ensure robust processing of analysis results and provide valuable insights into the performance of Log Detective runs. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a new handler for Log Detective results, which is a significant feature addition. The changes include the new DownstreamLogDetectiveResultsHandler, corresponding updates to event and model definitions, and new metrics for monitoring. The code is well-structured, and the inclusion of comprehensive tests is commendable. I've found a few areas for improvement: there's a potential for an unhandled exception in the event parser, and the new handler contains some unused variables and unreachable code that could be cleaned up for better maintainability. Overall, this is a solid contribution.
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 49s |
ca376b9 to
9592131
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 46s |
9592131 to
b28f85c
Compare
|
Build succeeded. ❌ non-voting-noop ERROR No playbook specified in 1s (non-voting) |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 46s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 51s |
7cb4f5f to
c729ad7
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 44s |
c729ad7 to
5d351fa
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 49s |
|
/gemini review |
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.
Code Review
This pull request introduces a handler for Log Detective results, along with necessary database schema changes and model updates. The changes are well-structured and include comprehensive tests. I've provided a few suggestions to improve data consistency in the database migration, optimize database access, and enhance code clarity and correctness. Overall, this is a solid contribution.
5d351fa to
f82924e
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 47s |
f82924e to
b90147b
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 45s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 56s |
235debf to
6e0ba2a
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 53s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 50s |
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 47s |
majamassarini
left a comment
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.
Thanks a lot for creating this!
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Parser has been updated with commit_sha, pr_id and project_url handling. Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
* separate analysis_id column for Log Detective analysis identification * switching to timezone agnostic timestamp * checkers for handler removed Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
Signed-off-by: Jiri Podivin <[email protected]>
62392be to
d2366f0
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 48s |
|
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 44s |
This PR implements results handler for Log Detective events. It also makes slight modifications to event handler logic, expands comments and renames a variable in
LogDetectiveRunModel.set_statusmethod, to improve clarity of the code.The
log_detective_analysis_starttimestamp is using ISO 8601 format with an offset. For sake of simplicity and consistency, the timezone is set to UTC.The
Pushgatewayclass has three more metrics. Two counters for started and finished Log Detective runs and one elapsed time tracker.The test file had a typo. While adding new test cases I have fixed it, this makes the diff somewhat larger than it would otherwise be.
I have tried to cover as much of the behavior as possible with tests. The coverage of
packit_service.worker.handlers.logdetectiveis now about 97% as measured by pytest.RELEASE NOTES BEGIN
Handle for Log Detective results reporting has been implemented in
packit_service.worker.handlers.logdetective.RELEASE NOTES END