fix: Show error and fatal logs in snazy output#2434
Conversation
Summary of ChangesHello @chmouel, 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 aims to improve the debugging experience within the CI pipeline by ensuring that critical log messages, specifically those marked as Highlights
Ignored Files
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
|
Modified the `snazy` command in the CI script to include the `-f error` and `-f fatal` flags. This ensures that only error and fatal messages instead of showing all log levels are displayed, and mising critical Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
🔍 PR Lint Feedback
|
20ea3d1 to
83ec9f3
Compare
There was a problem hiding this comment.
Code Review
This pull request improves the CI log output by filtering for error and fatal level logs using snazy, which should make it easier to spot problems. The changes are straightforward. I've added one comment regarding a potential issue where the log filtering might be too aggressive and could hide some relevant errors. Otherwise, the changes look good.
| output_logs() { | ||
| if command -v "snazy" >/dev/null 2>&1; then | ||
| snazy --extra-fields --skip-line-regexp="^(Reconcile (succeeded|error)|Updating webhook)" /tmp/logs/pac-pods.log | ||
| snazy --extra-fields --skip-line-regexp="^(Reconcile (succeeded|error)|Updating webhook)" -f error -f fatal /tmp/logs/pac-pods.log |
There was a problem hiding this comment.
While adding the log level filters for error and fatal is a great improvement for focusing on important issues, the --skip-line-regexp is configured to filter out lines that start with Reconcile error. This might cause some errors to be unintentionally hidden. To ensure all relevant errors are displayed, consider modifying the regular expression to no longer skip these lines.
| snazy --extra-fields --skip-line-regexp="^(Reconcile (succeeded|error)|Updating webhook)" -f error -f fatal /tmp/logs/pac-pods.log | |
| snazy --extra-fields --skip-line-regexp="^(Reconcile succeeded|Updating webhook)" -f error -f fatal /tmp/logs/pac-pods.log |
📝 Description of the Change
👨🏻 Linked Jira
🔗 Linked GitHub Issue
Fixes #
🚀 Type of Change
fix:)feat:)feat!:,fix!:)docs:)chore:)refactor:)enhance:)deps:)🧪 Testing Strategy
🤖 AI Assistance
If you have used AI assistance, please provide the following details:
Which LLM was used?
Extent of AI Assistance:
Important
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Gemini gemini@google.com
Co-authored-by: ChatGPT noreply@chatgpt.com
Co-authored-by: Claude noreply@anthropic.com
Co-authored-by: Cursor noreply@cursor.com
Co-authored-by: Copilot Copilot@users.noreply.github.com
**💡You can use the script
./hack/add-llm-coauthor.shto automatically addthese co-author trailers to your commits.
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.