You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(docker): stream build/compose progress live instead of on exit
The exec seam ran every docker subprocess with its stdout/stderr wired to
bytes.Buffers and only surfaced the output after the process exited, so a
`devcontainer build` (and the builds inside `up`) printed the whole BuildKit
log in one dump at the end with no visible progress.
Make streaming part of the Runner contract rather than a property of the
concrete OSRunner: Run now takes a `stream io.Writer` that, when non-nil,
receives the child's combined output live (OSRunner tees it to both the capture
buffer and the stream). The client passes this writer to whichever runner is
configured — real or fake — so there is no fake-vs-real branch and streaming is
exercised through the seam in tests.
docker.Client and ComposeClient gain a ProgressWriter; Build (and compose
build/up) opt into streaming, while Run/Config/Stop/Down stay buffered (compose
config's stdout is JSON the CLI parses and must not be streamed). The CLI sets
ProgressWriter to the log destination in text mode only — under --log-format
json a raw byte stream would corrupt the structured events, so that path keeps
emitting the buffered output as a log event.
Tests cover: OSRunner streams while still capturing; Build/compose-build stream
through the seam; streaming is opt-in (no ProgressWriter → nil stream); and
Run/compose-config never stream.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments