Repository navigation
fix(docker): image build runs out of memory on 8 GB builders - #248
Merged
Merged
Conversation
The build:docker step ran tsdown with dts enabled, then runtime-assets deleted every .d.ts. On openclaw 21933b7 the declaration pass pushes tsdown to 9.5 GB peak RSS, past the 7.7 GiB of GitHub's private-repo arm64 runner, so gandalf-manager's signup-container build OOMs at the heap limit on every attempt. With OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 (already used by package-openclaw-for-docker and the ciArtifacts build profile) the same build peaks at 3.1 GB and emits the same 5524 non-declaration files.
There was a problem hiding this comment.
No issues found across 2 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
augusteo
approved these changes
Sep 27, 2026
augusteo
left a comment
There was a problem hiding this comment.
Approve — verified at head 42270b1, CI-correctness and runner-capacity lens.
Skipping dts changes nothing that ships:
tsdown.config.ts:42reads the flag and setsdts: falseon all 17 tsdown entries; JS emit path is untouched.runtime-assetsstage (Dockerfile:151) already deletes every.d.ts/.d.mts/.d.ctsunder/app/dist, and the final stage copies only fromruntime-assets— no.d.tsever reached the image.- Same flag is already exercised by
scripts/package-openclaw-for-docker.mjs:355and theciArtifactsprofile inscripts/build-all.mjs, so the mechanism is proven, not new. src/dockerfile.test.tsnow hard-requires the flag in thebuild:dockerRUN — regression guard in place.
Runner headroom is real (arm64 proof, gandalf-manager run 36341206891):
- Step "Build openclaw base image (shared action)" succeeded at
openclaw_sha42270b1 on the 2 vCPU / 7.7 GiB runner:#33(thebuild:dockerRUN) finishedDONE 28.7s. - Pre-fix run 36337996143 on main died in that same
#33step:FATAL ERROR: Ineffective mark-compacts near heap limitat 572.5s. Same runner class, before/after is clean. - The run's overall
failureconclusion is the mgmt OIDC step (sts:AssumeRoleWithWebIdentity— role does not trust non-main refs); nothing was pushed or promoted, and it is unrelated to this change. - Heap-clamp claim checks out:
tsdown-build.mjscaps at cgroup/MemTotal minus 768 MB (~7143 MB here), so raising--max-old-space-sizecould not have fixed it — skipping the declaration pass is the right lever.
All 9 openclaw workflows green at 42270b1. LGTM.
convyusboy
added a commit
that referenced
this pull request
Sep 28, 2026
…249) * chore(release): bump version 2026.6.11-boon.46 -> 2026.6.11-boon.47 Root version, 135 plugin manifests synced via scripts/sync-plugin-versions.ts, changed npm-shrinkwrap.json files regenerated, CHANGELOG section for boon.47. Shipping: #236/#239 (a plugin tool's own execute() handler can now reliably schedule/unschedule a cron-backed session turn, fixing the browser-handoff recheck across three sequential live-found bugs), #240 (recheck backoff cap tightened 5m -> 2m), #242 (recheck messages the customer before attaching the browser), #241 (delivery.mode: "none" cron jobs can deliver an explicit message-tool send), #243 (Chrome MCP stderr drained before connect, not after), #247 (distinct exec-trajectory label for boon-projects schedule append/list), ENG-20030 (shared turn-resume-instruction wording for boon-core/anychat-boon-web), #248 (Docker build no longer OOMs 8 GB CI runners). Base = 2026.6.11-boon.46. Gateway plus @openclaw/slack, @openclaw/msteams and @openclaw/diagnostics-prometheus bumped in lockstep; no separately published plugin source changed in this train, so a gateway roll delivers all of it. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix(release): regenerate stale extension npm-shrinkwrap.json versions for boon.47 pnpm plugins:sync bumps each plugin's package.json version but does not touch its checked-in npm-shrinkwrap.json, so 65 published extension shrinkwraps still embedded version 2026.6.11-boon.46 despite package.json already reading boon.47. Since npm-shrinkwrap.json ships inside the npm artifact, this would have published every affected plugin with a mismatched embedded version. Bumped the version field(s) in all 65 (plus the openclaw peerDependency range where present) to 2026.6.11-boon.47, matching the pattern boon.46's bump commit already applied to these same files. Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
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.
What Problem This Solves
Fixes an issue where the Docker image build ran out of JavaScript heap during
pnpm build:docker(tsdown) on 8 GB builders. getboon/gandalf-manager builds this Dockerfile from source on GitHub's private-repo arm64 runner (2 vCPU, 7.7 GiB). Since openclaw21933b7cevery attempt dies withFATAL ERROR: Ineffective mark-compacts near heap limit, so the trial signup-container never builds or promotes (gandalf-manager run 36337996143, both attempts). The PR-sidebuild-and-smokegate hits the same wall.Why This Change Was Made
The build ran tsdown with declaration emit on, and the
runtime-assetsstage then deletes every.d.ts. The declaration pass was pure cost. The RUN now setsOPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1, the same flagscripts/package-openclaw-for-docker.mjsand theciArtifactsbuild profile already use. Raising--max-old-space-sizewould not help:scripts/tsdown-build.mjsalready clamps the heap to MemTotal minus 768 MB (about 7143 MB on that runner), which is where the build died.User Impact
No runtime change. The final image already contained no
.d.ts, and the JS output is the same. Image builds fit on 8 GB builders again with room to spare.Evidence
Local tsdown run at
21933b7c,OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB=7143to match the runner,/usr/bin/time -v:dist/,dist-runtime/andpackages/*/dist; before adds 1964.d.tssrc/dockerfile.test.tsandtest/scripts/test-install-sh-docker.test.tspass; the first now also fails if the flag is removed from the build:docker RUN.Real arm64 build: gandalf-manager run 36341206891, dispatched on a non-main ref (every push/promote step is gated on main) with
openclaw_ref=fix/docker-build-skip-dts. Same runner as the failing run (2 CPUs, 7.726 GiB). It built openclaw42270b19(this branch on21933b7c);build:dockerfinished in 28.7s, where run 36337996143 died after 12+ minutes, and the whole openclaw base image step passed. The run then stopped at the mgmt OIDC step, which does not trust non-main refs, so nothing was pushed or promoted.