ci(gates): browser job 컨테이너의 /dev/shm을 2 GB로 연다
frontend-quality-gates / merge / static checks (pull_request) Successful in 1m45s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 7m53s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / self-tests and removal drills (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / merge / tests (pull_request) Successful in 15m11s
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped

CI job 컨테이너의 /dev/shm은 Docker 기본값 64 MB다. 그래서 앞 커밋의
Firefox RAM 프로필이 CI에서는 켜지지 않는다. 프로필은 runner 디스크에
남고, 이유가 한 줄 찍힌다. main run 266(ee95573f)도 같은 꼴로
빨갛다. FE-GATE-009 [firefox] generated-feature.spec.ts:380에서 첫
화면(로그인 heading) 5초 대기를 넘겼다.

생성기가 Playwright 이미지를 쓰는 job 컨테이너에
`options: "--shm-size=2g"`를 붙인다(BROWSER_JOB_SHARED_MEMORY). 2 GB는
Firefox worker 6개 프로필 합 최대 211 MB와 fixture가 요구하는 worker당
64 MB에 여유를 둔 값이다. job 메모리 상한 10 GB 안에서 쓴다.
ci-quality-gates.md에 한 줄을 적었다.

버린 대안: runner 설정 `container.options`에 같은 값을 두는 안(계획
D-4 (가))은 운영 설정이라 소유자 실행 묶음에 있다. 그것이 적용되면 이
줄은 지워도 된다.

위험·한계: runner는 `privileged: false`다. act_runner가 workflow의 이
옵션을 무시하면 프로필은 그대로 디스크에 남고, FE-GATE-008·009 로그에
「Firefox profiles stay on disk」 줄이 남는다. runner run에서 그 줄이
없는지로 확인한다.

검증(desktop): generate:ci-workflow로 workflow와 snapshot 갱신,
ci-browser-image·ci-workflow-generation 시험 449 passed, check:ci-workflow,
check:types:node, eslint, scripts/verify.sh docs, verify:documentation 통과.
This commit is contained in:
DongHyeonka
2026-11-13 19:34:18 +09:00
parent f81dda4913
commit c239bdf4d5
5 changed files with 27 additions and 4 deletions
+17 -1
View File
@@ -210,7 +210,13 @@ function renderJob(
` timeout-minutes: ${job.timeoutMinutes}`,
);
const image = jobImage(job);
if (image) lines.push(" container:", ` image: ${yamlScalar(image)}`);
if (image) {
lines.push(
" container:",
` image: ${yamlScalar(image)}`,
` options: ${yamlScalar(`--shm-size=${BROWSER_JOB_SHARED_MEMORY}`)}`,
);
}
if (job.kind === "immutable") {
const archive = job.steps.find((step) => step.kind === "archive-candidate");
if (!archive || archive.kind !== "archive-candidate") throw new TypeError("immutable job lacks archive step");
@@ -291,6 +297,16 @@ function gateHostPrefix(gate: Readonly<{ hostEnvironment?: "system-container" |
return gate?.hostEnvironment === "system-container" ? "scripts/run-in-system-container.sh " : "";
}
/**
* /dev/shm of a browser job's container. Firefox's test profiles go there when
* it has room for every worker (tests/support/browser/browser-test.ts): with a
* profile on the runner's shared disk, Firefox's first localStorage access in
* a context waited up to 8.2 s and failed first-screen waits (FE-GATE-008 and
* FE-GATE-009, runs 127 and 266). Docker's default of 64 MB holds none; six
* Firefox workers' profiles peaked at 211 MB together (2026-11-13).
*/
export const BROWSER_JOB_SHARED_MEMORY = "2g";
/** The Playwright image a browser job runs in (`browser-install.image`), if any. */
function jobImage(job: CiWorkflowJob): string | undefined {
for (const step of job.steps) {