fix(dev): stream docker save without buffering in kind image load#464
Merged
Conversation
`kars dev` (and `--release`) failed at "Loading kars images into the kind
cluster" with:
Command's stdout was larger than 100000000 characters:
docker save 'karsacr.azurecr.io/openclaw-sandbox:latest'
`loadImageIntoKind` pipes `docker save <image>` into the kind node's
`ctr import`, but execa still accumulates the subprocess stdout into its
result — capped at `maxBuffer` (default 100 MB) — *even when the stream is
also piped*. The openclaw-sandbox image exceeds 100 MB, so execa throws and
aborts the whole bring-up.
Pass `buffer: false` to the `docker save` subprocess: the tarball is never
needed in memory (it streams straight to `ctr import`), so buffering is pure
overhead and the source of the failure.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pallakatos
pushed a commit
that referenced
this pull request
Jun 26, 2026
…on + dev kind-load fixes) - #467 fix(memory): consolidate Foundry Memory Store on the router; thin OpenClaw/Hermes clients; idempotent project-MI RBAC heal on `kars upgrade`. - #464 fix(dev): stream `docker save` without buffering in kind image load. - #465 fix(dev): load local-dev `:dev` image names into kind, not ACR `:latest`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Problem
kars dev(andkars dev --release) fails at step "Loading kars images into the kind cluster" with:Root cause
loadImageIntoKind()incli/src/commands/dev/local-k8s.tspipesdocker save <image>straight into the kind node'sctr import:Even though the stream is piped, execa still accumulates the subprocess stdout into its result, capped at
maxBuffer(default 100 MB). Theopenclaw-sandboximage exceeds 100 MB, so execa throwsmaxBuffer exceededand aborts the entire bring-up.Fix
Pass
{ buffer: false }to thedocker savesubprocess. The tarball is never needed in memory — it streams directly toctr import— so buffering is pure overhead and the source of the failure. One-line change plus an explanatory comment.Testing
kars dev --releaseaborts at "Loading kars images" on a host where the sandbox image is > 100 MB.docker save | ctr importstreams to completion and the kind load proceeds.Scope
Isolated, standalone CLI bugfix; no behavioral change beyond no longer aborting on large images.