Fix Workbench functional smoke heap limit - #376
Conversation
📝 WalkthroughWalkthroughThe ChangesCI Memory Limit
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/workbench-functional-smoke.yml (1)
112-119: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winConsider adding a comment to explain the NODE_OPTIONS setting.
The
NODE_OPTIONSenvironment variable correctly addresses the heap memory allocation failure and aligns with the pattern in.github/workflows/_build-reusable.yml(which includes explanatory comments). Adding a comment here would improve consistency and maintainability across the workflow files.✨ Suggested improvement
- name: Build unpacked app only shell: bash env: + # Node.js memory limit for vite bundling (prevents OOM during build) NODE_OPTIONS: '--max-old-space-size=8192' run: |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/workbench-functional-smoke.yml around lines 112 - 119, Add a comment above the NODE_OPTIONS environment variable in the "Build unpacked app only" step to explain that the max-old-space-size=8192 setting is needed to prevent heap memory allocation failures during the build process. This will improve consistency with the pattern used in the .github/workflows/_build-reusable.yml file and make the purpose of this configuration clear to future maintainers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/workbench-functional-smoke.yml:
- Around line 112-119: Add a comment above the NODE_OPTIONS environment variable
in the "Build unpacked app only" step to explain that the
max-old-space-size=8192 setting is needed to prevent heap memory allocation
failures during the build process. This will improve consistency with the
pattern used in the .github/workflows/_build-reusable.yml file and make the
purpose of this configuration clear to future maintainers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: a848c4e5-6eb3-4865-8754-9d08f461d64c
📒 Files selected for processing (1)
.github/workflows/workbench-functional-smoke.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (11)
- GitHub Check: Coverage Test
- GitHub Check: Unit Tests (ubuntu-latest)
- GitHub Check: Unit Tests (windows-2022)
- GitHub Check: Build Test (macos-x64)
- GitHub Check: Build Test (linux)
- GitHub Check: Build Test (windows-x64)
- GitHub Check: Code Quality
- GitHub Check: Build Test (macos-arm64)
- GitHub Check: Build Test (windows-arm64)
- GitHub Check: I18n Check
- GitHub Check: Unit Tests (macos-14)
🔇 Additional comments (1)
.github/workflows/workbench-functional-smoke.yml (1)
114-115: LGTM! The NODE_OPTIONS setting correctly fixes the heap allocation failure.The change:
- Adds the correct heap size limit (8192 MB) matching existing build workflows
- Is properly scoped to this step only
- Will be correctly propagated to the Node subprocess via environment inheritance
- Aligns with the established pattern in
_build-reusable.yml
Summary
Evidence
electron-vite buildwithFATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory.NODE_OPTIONS=--max-old-space-size=8192for build steps.Validation
actionlint .github/workflows/workbench-functional-smoke.ymlBUN_INSTALL_CACHE_DIR=/Volumes/LEXAR/Codex/.cache/bun bunx oxfmt@0.41.0 --check .github/workflows/workbench-functional-smoke.ymlgit diff --checkRefs #372, #363, #374
Summary by CodeRabbit