-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix podman logs --tail when log is bigger than pagesize #7232
fix podman logs --tail when log is bigger than pagesize #7232
Conversation
ac12a2f
to
bf13242
Compare
@@ -61,6 +61,6 @@ func (r *ReverseReader) Read() (string, error) { | |||
b = b[0:n] | |||
} | |||
// Set to the next page boundary | |||
r.offset = -r.readSize | |||
r.offset -= r.readSize |
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.
let's adjust the comment to reflect what is done now
LGTM with @giuseppe comment. |
New test also seems to be failing |
LGTM |
Signed-off-by: Paul Holzinger <[email protected]>
bf13242
to
2c79f99
Compare
OK, I updated the code. Tests were failing due an race condition were the file was closed to early. Should be fixed now. |
@@ -101,11 +101,14 @@ func getTailLog(path string, tail int) ([]*LogLine, error) { | |||
if err != nil { | |||
if errors.Cause(err) == io.EOF { | |||
inputs <- []string{leftover} | |||
close(inputs) |
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.
Is this close done somewhere else? Is it not needed?
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.
It is closed below
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #7230