test(logs): enforce log-file strictness and centralize log filename parsing#4620
test(logs): enforce log-file strictness and centralize log filename parsing#4620PranjalC100 wants to merge 1 commit intomasterfrom
Conversation
Summary of ChangesHello, 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 centralizes and strengthens log file handling within the integration test suite. By enforcing consistent naming conventions and ensuring that log file access errors result in immediate test failures, the changes prevent silent validation passes and improve the reliability of the test suite. 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. Footnotes
|
6d29e5d to
217dfbe
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors error handling in integration tests by using require.NoError and updates the log file path parsing logic to handle comma-separated flags and configuration-based inference. Feedback indicates a missing import for the require package, a potential regression where an empty log filename could result in a directory path instead of a file, and an edge case where an empty --log-file flag value leads to an incorrect filename.
217dfbe to
277ce6a
Compare
277ce6a to
af7478b
Compare
|
Hi @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
Description
This PR centralizes and strengthens log file handling within the integration test suite. It ensures that log files are consistently parsed with the correct
.logsuffix and that failures to open log files result in immediate test failure rather than silent errors during mounted directory tests.Vulnerability Analysis: Silent Test Validation Passes
1. The Root Cause
In
inactive_stream_timeout, test validations check for the absence of activity logs viadoesNotHaveInactiveReaderClosedLogLineInLogFile. Previously, if the target file handle was unavailable, the system printed an error but completely skipped blocking assertions because it evaluatederr == nilas false:Original Unsafe Code (before fixes):
The Output
The test package prints success
(PASS)without actually verifying from the logs:Key Changes:
Link to the issue in case of a bug fix.
link
Testing details
Any backward incompatible change? If so, please explain.
No.