Skip to content

ci(shorebird): stream child stdout/stderr from shard_runner#144

Merged
eseidel merged 2 commits intoshorebird/devfrom
es/stream-shard-runner-output
May 8, 2026
Merged

ci(shorebird): stream child stdout/stderr from shard_runner#144
eseidel merged 2 commits intoshorebird/devfrom
es/stream-shard-runner-output

Conversation

@eseidel
Copy link
Copy Markdown

@eseidel eseidel commented May 8, 2026

Summary

runChecked used Process.run, which buffers stdout/stderr in memory
and only emits anything on a non-zero exit — and on success, nothing at
all. The result: 30+ minutes of ninja, cargo, and gclient output
per shard never reached the GitHub Actions log. Only the runner's own
[Step] starting / [Step] complete prints made it through, so a
healthy shard looked like a frozen one.

The legacy mac_build.sh / linux_build.sh scripts streamed naturally
(plain bash invocations of \$NINJA -C ...), so this was a regression
the sharded runner introduced.

Change

  • runChecked now uses Process.start with ProcessStartMode.inheritStdio,
    so child stdout/stderr go live to the parent's stdio (and thus the CI
    log). On failure the exception just notes the exit code — captured
    output is no longer included because it already streamed.
  • New runCapturingStdout for the one place that actually parses child
    output (gsutil ls in lib/gcs.dart). It captures stdout while
    still streaming stderr.
  • lib/gcs.dart updated to use it.

Test plan

  • dart analyze clean
  • dart test (32/32 pass)
  • Trigger sharded build in _build_engine; verify ninja [N/M]
    progress lines and cargo per-target output appear live in the
    GHA log

eseidel added 2 commits May 7, 2026 20:00
`runChecked` used `Process.run`, which buffers stdout/stderr in memory
and prints nothing until the process exits — and on success, prints
nothing at all. That hid 30+ minutes of ninja, cargo, and gclient
output per shard from the GitHub Actions log; only the [Step] start /
[Step] complete prints from the runner itself made it through. The
legacy bash build scripts streamed naturally, so this is a regression
the sharded runner introduced.

Switch `runChecked` to `Process.start` with inheritStdio so output
goes live to the parent's stdio. The error path no longer needs to
echo captured output (it already streamed) — the exception just notes
the exit code and description.

Add `runCapturingStdout` for the one place that actually parses child
output (`gsutil ls` in lib/gcs.dart). It captures stdout while still
streaming stderr, so failures still appear in the log live.

Tests: 32/32 pass; dart analyze clean.
@eseidel eseidel requested a review from bdero May 8, 2026 03:15
@eseidel eseidel enabled auto-merge (squash) May 8, 2026 03:15
@eseidel eseidel merged commit bf082fe into shorebird/dev May 8, 2026
10 checks passed
@eseidel eseidel deleted the es/stream-shard-runner-output branch May 8, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants