ci: Increase memory limit and disable concurrent builds for esbuild in docker#9862
Conversation
WalkthroughIn four Dockerfiles, the frontend build command increases Node.js heap from 4096 MB to 8192 MB and adds JOBS=1 to force single-threaded builds. One file also adds a comment explaining the change. No other build steps are modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
docker/build_and_push_with_extras.Dockerfile (1)
55-58: Cap esbuild threads with GOMAXPROCS=1 for deterministic, low‑memory buildsSame rationale as other Dockerfiles: JOBS=1 won’t affect esbuild; use GOMAXPROCS=1 alongside your heap bump.
Apply:
- && NODE_OPTIONS="--max-old-space-size=8192" JOBS=1 npm run build \ + && NODE_OPTIONS="--max-old-space-size=8192" GOMAXPROCS=1 JOBS=1 npm run build \docker/build_and_push_ep.Dockerfile (1)
55-58: Use GOMAXPROCS=1 to actually disable esbuild concurrencyThis ensures the Go runtime inside esbuild runs single‑threaded. Keep JOBS=1 if you also want to serialize node‑gyp.
Apply:
- && NODE_OPTIONS="--max-old-space-size=8192" JOBS=1 npm run build \ + && NODE_OPTIONS="--max-old-space-size=8192" GOMAXPROCS=1 JOBS=1 npm run build \docker/build_and_push_base.Dockerfile (1)
59-61: Make frontend install reproducible and cached; align with other DockerfilesHere you use npm install without cache mount; other images use npm ci with an npm cache. This hurts determinism and cacheability.
Apply:
-RUN npm install \ - && NODE_OPTIONS="--max-old-space-size=8192" JOBS=1 npm run build \ +RUN --mount=type=cache,target=/root/.npm \ + npm ci --no-audit --fund=false \ + && NODE_OPTIONS="--max-old-space-size=8192" GOMAXPROCS=1 JOBS=1 npm run build \docker/build_and_push.Dockerfile (1)
55-58: Set GOMAXPROCS=1 when running the frontend buildsrc/frontend/package.json shows "build": "vite build" and an "esbuild" dependency — JOBS=1 won't throttle esbuild's Go workers; add GOMAXPROCS=1 to cap Go threads.
Apply:
- && NODE_OPTIONS="--max-old-space-size=8192" JOBS=1 npm run build \ + && NODE_OPTIONS="--max-old-space-size=8192" GOMAXPROCS=1 JOBS=1 npm run build \
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
docker/build_and_push.Dockerfile(1 hunks)docker/build_and_push_base.Dockerfile(1 hunks)docker/build_and_push_ep.Dockerfile(1 hunks)docker/build_and_push_with_extras.Dockerfile(1 hunks)
🔇 Additional comments (1)
docker/build_and_push_base.Dockerfile (1)
58-61: Good call adding the explanatory commentThe note about emulated architectures is helpful context.



Adjust the memory limit to prevent esbuild crashes and disable concurrent builds across multiple Dockerfiles.
Summary by CodeRabbit
Bug Fixes
Chores