-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Parse the last partial line in CRI logs #55631
Parse the last partial line in CRI logs #55631
Conversation
Fixes part of kubernetes#44976 Signed-off-by: Mrunal Patel <[email protected]>
@mrunalp - this implements what was proposed here in the absence of a better solution? what you have now is better than what we have previously, so this works for me for the moment. |
@derekwaynecarr Yes, that's what this PR implements. |
this is no worse than what we have before, and makes more content visible to users that were previously invisible. in that vein, this is good to me and doesn't preclude us doing more in future. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: derekwaynecarr, mrunalp Associated issue: 44976 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
LGTM. I prefer adding a helper function instead of copying code, but I'm fine with doing that in another PR. |
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.
LGTM. We may also add a test for such case.
Automatic merge from submit-queue (batch tested with PRs 55697, 55631, 51905, 55647, 55826). If you want to cherry-pick this change to another branch, please follow the instructions here. |
@Random-Liu @yujuhong @runcom @feiskyer PTAL
Fixes part of #44976
This should work while we find a longer term format for CRI logs.
Signed-off-by: Mrunal Patel [email protected]
What this PR does / why we need it:
This PR attempts to parse the last line of log even if it doesn't have a newline. Today for CRI based log formats such lines are ignored and empty output is returned.
Which issue(s) this PR fixes
Fixes part of #44976
Special notes for your reviewer:
Use a CRI runtime like CRI-O and the output will be empty for these commands without this PR.
Release Note: