-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: finish the CLI logs part #1472
feature: finish the CLI logs part #1472
Conversation
Unfortunately, CI fails with golint, @fuweid :
Interesting. |
@allencloud I want to add the |
@HusterWan Please help me to check the failed case 😄 thanks |
Codecov Report
@@ Coverage Diff @@
## master #1472 +/- ##
===========================================
+ Coverage 16.5% 40.87% +24.37%
===========================================
Files 210 253 +43
Lines 13889 16539 +2650
===========================================
+ Hits 2292 6760 +4468
+ Misses 11441 8922 -2519
- Partials 156 857 +701
|
Quite interesting, the test coverage decreases. 😄 |
left = 0 | ||
} | ||
|
||
b = make([]byte, blockSize) | ||
b = make([]byte, readN) |
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.
If the content don't end with \n
like 1\n2\n3\n4
, seekOffsetByTailLines(, 2)
will return the index of 2
. The tail content would be 2\n3\n4
. Compared with command tail, echo "1\n2\n3\n4" > a.txt; tail -n2 a.txt
is 3\n4
.
Does this function works as expected?😁 @fuweid
this function is only used for the jsonfile log driver. The last line in the file must contain the carriage. So don’t worry about this
|
haha. I got it. Thanks for your reply at midnight~ @fuweid |
Signed-off-by: Wei Fu <[email protected]>
LGTM |
Signed-off-by: Wei Fu [email protected]
Ⅰ. Describe what this PR did
Finish the CLI logs part in the pouch
Ⅱ. Does this pull request fix one issue?
Fixed #1371
Ⅲ. Describe how you did it
Since the API parts has been done, the CLI part is just to fill the logic. However, during the testing, we found the IO issue like #1471 .
Some case maybe fail and it will be flaky case if #1471 doesn't merge.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews