Skip to content

Commit b8b9da7

Browse files
committed
fix(agent-e2e): stabilize CI web-server bundling for Playwright
The DKG-Node-Tests Playwright webServer ran 'turbo dev', which starts three persistent processes at once (dev:app=Metro/Expo, dev:server, drizzle:studio). Under CI memory pressure, Metro intermittently failed bundling the heavy web app (1337 modules incl three.js's three.core.js) -> 'Bundling failed' -> the app didn't render -> UI tests flaked UNSTABLE. The app bundles cleanly locally (verified expo export + dev server), so this is CI resource contention, not a code bug. Scope the test web-server to only what E2E needs (dev:app + dev:server; drop drizzle:studio, a DB GUI tests never touch) and give Metro extra heap (--max-old-space-size=4096). Verified locally: app comes up at :8081 and the web bundle compiles cleanly (1337 modules, no three.core.js error).
1 parent 7d86a94 commit b8b9da7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/agent/playwright.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,16 @@ module.exports = defineConfig({
103103

104104
/* Run your local dev server before starting the tests */
105105
webServer: {
106-
command: "turbo dev",
106+
// E2E only needs the Expo web app (8081) + the backend server. Start just those
107+
// two (skip drizzle:studio — a DB GUI the tests never touch) and give Metro extra
108+
// heap, so bundling the heavy web app (1337 modules incl three.js) doesn't
109+
// intermittently OOM / "Bundling failed" under CI resource pressure when three
110+
// persistent dev processes start at once.
111+
command: "turbo run dev:app dev:server",
112+
env: {
113+
...process.env,
114+
NODE_OPTIONS: `${process.env.NODE_OPTIONS || ""} --max-old-space-size=4096`.trim(),
115+
},
107116
url: "http://localhost:8081",
108117
reuseExistingServer: false, // Always start fresh - prevents session persistence
109118
timeout: process.env.CI ? 300 * 1000 : 120 * 1000, // 5 minutes in CI, 2 minutes locally

0 commit comments

Comments
 (0)