Skip to content

fix(nomad): send the error of a broken file stream before its lines close - #183

Merged
ingvarch merged 1 commit into
mainfrom
fix/file-stream-error
Nov 4, 2026
Merged

ingvarch merged 1 commit into
mainfrom
fix/file-stream-error

Conversation

@ingvarch

@ingvarch ingvarch commented Nov 4, 2026

Copy link
Copy Markdown
Owner

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.

  • File sends the error from the goroutine that closes the lines, after the last line and before they close. That goroutine is followFrames in internal/nomad/files.go, which the agent log stream (followAgent) now shares instead of having its own copy.
  • A refused file stream (no frames at all) also closes its lines after its error, as the agent log does.
  • Tests: through 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); followFrames with 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

  • The test for this change was written first and failed
  • make check is green
  • The title is a conventional commit: feat(ui): ..., fix(nomad): ...

@ingvarch ingvarch added this to the v0.17.0 milestone Nov 4, 2026
@ingvarch ingvarch added bug Something isn't working logs Logs, files and the streams that read them labels Nov 4, 2026
@ingvarch
ingvarch merged commit 8eeb0a1 into main Nov 4, 2026
5 checks passed
@ingvarch
ingvarch deleted the fix/file-stream-error branch November 4, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working logs Logs, files and the streams that read them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A file stream that breaks can end without its error

1 participant