-
Notifications
You must be signed in to change notification settings - Fork 205
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
PART 2: WebAPI::Controller::Running: Remove uncovered close_connection handler - After #5755 #4898
Conversation
my @st = stat $logfile; | ||
return $close_connection->() unless @st && $st[1] == $ino && $st[3] > 0 && $st[7] >= $size; | ||
die "Zero tolerance for any shenanigans with the logfile, such as truncation, rotation, etc." |
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.
We should likely close the connection here as the code previously did. Otherwise we'd leave the client waiting for further data until a timeout occurs. Placing a die
here seems generally wrong as it would likely just be caught by Mojolicious' handler. The message has also not enough context to be useful in the server-side logs (where it would end up). If we wanted better error handling, then an error should likely go to the client in form of a bad return code.
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.
ok, I agree. All CI tests passing show that we are missing test coverage here
3cc59ff
to
e86b605
Compare
e86b605
to
f838979
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4898 +/- ##
==========================================
- Coverage 98.43% 98.43% -0.01%
==========================================
Files 393 393
Lines 38594 38593 -1
==========================================
- Hits 37991 37990 -1
Misses 603 603 ☔ View full report in Codecov by Sentry. |
f838979
to
11bab0e
Compare
After: