fix(ci): move docker-e2e test scratch off tmpfs to disk (#702)

The nightly Docker Container E2E job writes every fork's image and video
scratch under /tmp, which docker-compose.test.yml mounted as a 2g tmpfs.
On the 7GB runner that scratch either exhausted RAM (the runner was killed
mid-run, exit 137) or, once the tmpfs was sized to cap RAM in an earlier
attempt, hit ENOSPC and failed ~1100 tests. Drop the test-unit tmpfs mounts
so scratch lands on the container's disk-backed layer, which the job already
frees to ~110G. Keep VITEST_MAX_FORKS=1 for the memory ceiling; Postgres and
Redis keep their small tmpfs data mounts.
This commit is contained in:
SnapOtter
2026-07-31 13:28:38 +08:00
committed by GitHub
parent 1671344fa3
commit ae56a0ab7a
+9 -10
View File
@@ -62,17 +62,16 @@ services:
- SYNC_WAIT_MS=120000
- VITEST_TEST_TIMEOUT=180000
- VITEST_HOOK_TIMEOUT=120000
# /tmp is tmpfs (RAM-backed) below, so each fork's scratch files count
# against RAM alongside the app plus Postgres and Redis. On a 7GB CI
# runner the default fork-per-core parallelism has correlated with the
# runner being killed mid-run (exit 137). One fork bounds the peak; the
# 90-minute job budget absorbs the slower serial run.
# One vitest fork bounds peak memory on a 7GB CI runner; the 90-minute
# job budget absorbs the slower serial run.
- VITEST_MAX_FORKS=1
tmpfs:
# Cap the RAM-backed scratch mounts so a burst of large temp files (a
# multi-megapixel encode, a video transcode) cannot exhaust runner RAM.
- /tmp/test-workspace:size=1g
- /tmp:size=2g
# No tmpfs: the tools write multi-megapixel encodes and video transcodes to
# WORKSPACE_PATH and /tmp, and a RAM-backed mount made that scratch count
# against the 7GB runner alongside the app, Postgres, and Redis, which
# correlated with the runner being killed mid-run (exit 137). Sizing the
# tmpfs instead just moved the failure to ENOSPC. Let scratch land on the
# container's disk-backed layer, which has ample room once the job frees the
# preinstalled toolchains.
depends_on:
postgres:
condition: service_healthy