Skip to content

Fix: stream docker logs - #657

Merged
runabol merged 1 commit into
mainfrom
stream-docker-logs-fix
Nov 11, 2026
Merged

runabol merged 1 commit into
mainfrom
stream-docker-logs-fix

Conversation

@runabol

@runabol runabol commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner
  • Fix a race when tearing down Docker follow log streams in Wait() and probeContainer(): a background io.Copy could still be reading while the log reader (and underlying connection) was closed, which spammed error reading the std out in prod even when tasks succeeded.
  • Replace fire-and-forget log copy + immediate defer Close with streamLogs(), which closes the reader, waits for the copy goroutine, and only logs unexpected read errors.
  • Treat expected shutdown errors as benign (net.ErrClosed, http.ErrBodyReadAfterClose, http: read on closed response body, etc.). Prod logs showed e.g. read unix @->/run/docker.sock: use of closed network connection — normal teardown of the Moby client socket during log-follow shutdown, not task failure.

@runabol
runabol force-pushed the stream-docker-logs-fix branch 2 times, most recently from d419988 to 48eaf5e Compare November 11, 2026 16:18
@runabol
runabol force-pushed the stream-docker-logs-fix branch from 48eaf5e to e84075b Compare November 11, 2026 16:34
@runabol
runabol merged commit ff7ec75 into main Nov 11, 2026
3 of 5 checks passed
@runabol
runabol deleted the stream-docker-logs-fix branch November 11, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant