Repository navigation
fix(nomad): send the error of a broken file stream before its lines close - #183
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
A file that breaks while urga follows it now shows its error on the file screen every time. Before, the error was sent from a goroutine of its own, and when the break left no half line waiting, the lines could close first: the screen then showed a plain end.
Filesends the error from the goroutine that closes the lines, after the last line and before they close. That goroutine isfollowFramesininternal/nomad/files.go, which the agent log stream (followAgent) now shares instead of having its own copy.File, a stream that breaks after its lines sends its error after the last line and before the end (the old code failed it on every run);followFrameswith the frames closed before the error comes keeps the lines open until it does; a refused stream ends with its error. They pass with-count=50 -race.Left as it is, as the issue says: task logs. Their error can still be taken before a last line that waits for its line break; that is a separate case.
Closes #176
Checklist
make checkis greenfeat(ui): ...,fix(nomad): ...