Uh oh!
There was an error while loading. Please reload this page.
Fix flaky streamer test ENOENT when chunks directory does not exist yet - #1330
Conversation
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Stream Benchmarks(includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (56 failed)mongodb (3 failed):
redis (2 failed):
turso (51 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
|
There was a problem hiding this comment.
Pull request overview
This PR hardens the streamer test failure-debugging path to avoid flaking when the chunks directory hasn’t been created yet (notably on Windows CI).
Changes:
- Add a guarded
readdiraroundstreams/chunksin theonTestFinishedfailure branch. - Reuse a
chunksPathvariable when reading chunk files for debug output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| const chunksPath = `${testDir}/streams/chunks`; | ||
| let files: string[]; | ||
| try { | ||
| files = await fs.readdir(chunksPath); | ||
| } catch { |
There was a problem hiding this comment.
The broad catch { files = [] } will also hide unexpected errors (e.g., EACCES/corrupted temp dir) and can make failures harder to diagnose. Consider catching the error, only treating ENOENT as an empty directory, and rethrowing anything else. Also, since this is Windows-flake related and the rest of the file uses path.join, building chunksPath via path.join(testDir, 'streams', 'chunks') would be more consistent and robust.
Uh oh!
There was an error while loading. Please reload this page.
…ignal * origin/main: (26 commits) Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330) Version Packages (beta) (#1325) [web-shared] Improve workflow observability event list UX (#1337) feat: add `exists` getter to `Run` class (#1336) Support client-side tools in DurableAgent (#1329) [world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334) Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326) [web] Polish loading indicators (#1327) Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328) feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317) Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation [web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322) Version Packages (beta) (#1306) Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319) fix(web): move react-router deps to devDependencies (#1265) fix(ai): use workspace:* for workflow peer dependency (#1320) fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318) fix: surface 429 rate-limit errors in e2e tests and CLI (#1309) fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307) [web-shared] [cli] Refactor observability data fetching (#1261) ... # Conflicts: # packages/core/e2e/e2e.test.ts # packages/web-shared/src/components/sidebar/attribute-panel.tsx # workbench/example/workflows/99_e2e.ts
Summary
Fixes two issues causing the streamer race condition test to fail on Windows CI (run):
ENOENT in
onTestFinisheddebug callback: When the test fails before any chunks are written, thestreams/chunksdirectory doesn't exist yet. Thereaddircall in the debug dump now catchesENOENTand falls back to an empty array instead of throwing a secondary error that masks the real failure.Test timeout (20s) on slow Windows CI: The race condition test ran 10 iterations, each creating a fresh temp directory and streamer. With per-chunk I/O latency of ~100-200ms on Windows CI runners, 10 iterations took ~22s, exceeding the 20s timeout. Reduced to 3 iterations which still provides race condition coverage while fitting comfortably within the timeout.