-
Notifications
You must be signed in to change notification settings - Fork 2k
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 log streaming missing frames #11721
Fix log streaming missing frames #11721
Conversation
…g_streaming_missing_frames
ab692ae
to
3c245b8
Compare
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.
Hi @arkadiuss and thanks for this PR! I see where you're going with this but I've left some remarks about the previous channel that we got from blockUntilNextLog
and what we're doing with it.
…ss/nomad into fix_log_streaming_missing_frames
I wanted to cover this scenario in tests. It was hard to create deterministic test since we don't know which event will come first, but I modfied the existing test in a way that the old code (without fix) fails it in most of the cases. |
Co-authored-by: Tim Gross <[email protected]>
…ss/nomad into fix_log_streaming_missing_frames
@arkadiuss if you'd like to add a changelog bugfix entry that'd be appreciated. Create a file at
|
Thanks, it's added |
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! Thanks for the PR @arkadiuss and thanks for sticking with it through a tricky review! This will ship in the next scheduled release of Nomad.
Awesome! It was great experience to work with you on it. Thank you for this, in-depth questions and quick responses! |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Hi,
this MR aims to address the issue reported here #11653 . I described the problem in this comment.
This solution adds one more channel to the
streamFile
function that instead of cancelling on the event from channel when eof is reached, it performs one more read until eof which I think should be an expected behavior while streaming logs.It is a draft for now opened for discussion. I confirmed that it works for the example posted in the issue. It should work since while newFileEvent is generated, the previous file is already full.
I haven't checked tests yet.