fix: 프로필 프론트 빌드 heap을 분리

운영 runtime의 공용 Node heap은 유지하면서 profile vue-tsc와 Vite build에만 별도 NODE_OPTIONS를 적용한다.\n\nsam.hided.net HWE에서 확인한 1536 MiB heap OOM을 2048 MiB build override로 처리할 수 있도록 회귀 테스트와 운영 문서를 추가한다.
This commit is contained in:
2026-08-19 13:20:40 +00:00
parent 54a5b91ca9
commit 04fc7dfe52
3 changed files with 37 additions and 4 deletions
@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest';
import path from 'node:path';
import {
buildProfileFrontendCommands,
buildProfileMigrationCommand,
buildProcessDefinitions,
buildWorkspaceCommands,
@@ -330,3 +331,30 @@ describe('buildWorkspaceCommands', () => {
});
});
});
describe('buildProfileFrontendCommands', () => {
it('uses a profile frontend build-only Node heap without changing the shared runtime heap', () => {
const workspaceRoot = '/srv/sammo/worktrees/0123456789abcdef';
const commands = buildProfileFrontendCommands(workspaceRoot, buildProfile(), {
NODE_OPTIONS: '--max-old-space-size=1536',
PROFILE_FRONTEND_BUILD_NODE_OPTIONS: '--max-old-space-size=2048',
});
expect(commands).toHaveLength(2);
expect(commands.every((command) => command.env?.NODE_OPTIONS === '--max-old-space-size=2048')).toBe(true);
expect(
commands.every(
(command) => command.env?.PROFILE_FRONTEND_BUILD_NODE_OPTIONS === '--max-old-space-size=2048'
)
).toBe(true);
});
it('keeps the shared Node heap when no frontend build override is configured', () => {
const workspaceRoot = '/srv/sammo/worktrees/0123456789abcdef';
const commands = buildProfileFrontendCommands(workspaceRoot, buildProfile(), {
NODE_OPTIONS: '--max-old-space-size=1536',
});
expect(commands.every((command) => command.env?.NODE_OPTIONS === '--max-old-space-size=1536')).toBe(true);
});
});