Update workbench tests to build and run outside of monorepo #1230
Update workbench tests to build and run outside of monorepo #1230
Conversation
🦋 Changeset detectedLatest commit: a783ad6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 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: Express | Next.js (Turbopack) | Nitro workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | 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: Nitro | Next.js (Turbopack) | Express 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: Express | Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | 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 (48 failed)turso (48 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
|
@ijjk Thanks! Indeed I can run my workflow now with That said, the flag is still unusable for me during development. The dev server doesn't detect changes to an existing step, like adding a |
|
Ah that's definitely not ideal, let me see why our HMR tests with lazy aren't catching that and get fix in here for that too |
|
@rovo89 this PR is updated and HMR should be properly handled was missing some cache invalidation in the loader it seems. If you have a local cache you will need to wipe |
pranaygp
left a comment
There was a problem hiding this comment.
this PR is doing more than just e2e changes. let's update PR description for posterity and pls also changeset :)
TooTallNate
left a comment
There was a problem hiding this comment.
Overall this is solid work — the core fix (deferred discovery/rebuild outside monorepo) and the tarball-staged test infrastructure are both well-validated by the full green CI suite. A few observations inline, nothing blocking.
TooTallNate
left a comment
There was a problem hiding this comment.
All previous feedback has been addressed in the two follow-up commits:
- CI duplication → Extracted into
.github/actions/prepare-workbench-path/action.ymlcomposite action. Clean. while (true)polling loops → Replaced with apollUntilhelper that has an explicit deadline and surfaces the last error message on timeout. Much better debuggability.readFileSyncin loader → Switched to asyncreadFilefromnode:fs/promises, withgetSocketCredentialsandgetSocketCredentialsFromFilenow properly async.collectTransitiveStepFiles/collectTransitiveSerdeFilesre-validation semantics → Added clear comments explaining the intentional re-validation behavior.getFallbackWorkflowIdcoupling → Added comment noting the intentional coupling to the SWC transform ID format.flushStreamin CLI base → Hardened with additional guards (destroyed,closed,writableEnded,writableFinished) and error handling viastream.once('error', ...)+ try/catch. Good defensive improvement.
100/100 CI checks green. LGTM.
This PR fixes deferred/lazy behavior outside the monorepo and updates our local E2E flow to run workbenches from staged tarballs so tests match real user installs.
What changed
scripts/stage-workbench-with-tarballs.mjsto:$TMPDIRwith symlinks resolvedworkbench/scriptsand repolibinto the staged workspacepnpm packall monorepo packages and rewrite staged dependencies to local tarballs.github/workflows/tests.yml) and updated E2E path resolution viaWORKBENCH_APP_PATH.packages/core/e2e/dev.test.ts)packages/core/e2e/e2e.test.ts)@workflow/next:console.logchanges) trigger rebuild/HMR correctly outside monorepoValidation
~/dev/repros/lazy-workflowusing latest tarball build:src/workflows/chat/steps.ts/api/testx-ref: #1159