fix: settle aborted parallel steps before completing abortParallelWorkflow#2244
fix: settle aborted parallel steps before completing abortParallelWorkflow#2244pranaygp wants to merge 2 commits into
Conversation
|
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
workflow with 1 step💻 Local Development
▲ Production (Vercel)
workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
❌ Some benchmark jobs failed:
Check the workflow run for details. |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (5 failed)astro (1 failed):
nextjs-turbopack (1 failed):
nitro (1 failed):
vite (2 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
There was a problem hiding this comment.
Pull request overview
This PR updates the abort-parallel E2E workflow to ensure that once the workflow times out and triggers an abort, it waits for the in-flight parallel steps to observe the abort and settle before returning. This prevents “dangling” parallel work from keeping the run open until the long steps reach their natural completion, and it strengthens the E2E assertion to prove all branches actually took the abort path.
Changes:
- Keep the three parallel
longStep()executions alive via a namedparallelStepspromise so it can be awaited after timeout/abort. - On timeout, abort the controller and then
await parallelStepsbefore returning, including the settled results in the return value. - Update the E2E test to assert that the workflow returns
results: ["aborted", "aborted", "aborted"]for the timeout path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| workbench/example/workflows/99_e2e.ts | Persists the parallel steps promise and awaits it after abort on timeout, returning the settled step results. |
| packages/core/e2e/e2e.test.ts | Strengthens the assertion to verify all parallel steps actually observed the abort and returned "aborted". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
longStep()promises alive as a named promise so the workflow can await them after abortingAbortController > abortParallelWorkflow: abort cancels all parallel stepsreturns["aborted", "aborted", "aborted"]Validation
git diff --checkWORKFLOW_PUBLIC_MANIFEST=1 pnpm devinworkbench/nextjs-turbopackDEPLOYMENT_URL="http://localhost:3000" APP_NAME="nextjs-turbopack" pnpm vitest run packages/core/e2e/e2e.test.ts -t "abortParallelWorkflow: abort cancels all parallel steps"Notes
Workflow "workflow//./workflows/99_e2e//abortParallelWorkflow" is not registered in the current deployment.Module not found: Can't resolve <dynamic>frompackages/core/dist/runtime/world.js.