Fix Nitro Vercel workflow routes#2645
Draft
NathanColosimo wants to merge 3 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: 7ff29ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 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 |
Contributor
Contributor
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (99 failed)redis (19 failed):
turso (80 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
4a7d3e5 to
fc89089
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Nitro Vercel Build Output shape for Workflow apps on
stable.Issue #2460 happens when Nitro's Vercel preset emits the public Workflow HTTP endpoints as routes into Nitro's server function while Workflow also needs real queue-triggered functions for flow/step execution. If those generated function entries are left as Nitro aliases instead of Workflow queue functions, the deployment has the wrong runtime shape for Workflow's queue-triggered execution model.
This PR keeps the public Workflow HTTP endpoints on Nitro's generated server function, while ensuring the flow/step workers are emitted as real Workflow queue-trigger functions.
Concretely, the Nitro Vercel builder now:
.vercel/output/config.json__server.funcor__fallback.func)filesystemIt also keeps stable compatible with current Nitro 3 beta releases by:
.nitro/workflow/**dev handling into a small compatibility path that both ignores those files for dev reloads and preserves the old Nitro alpha externalization behavior needed by stable CIdefinePluginfrom Nitro's public runtime export instead of the removed privatenitro/~internal/runtime/pluginpathFixes #2460.
Verification
Targeted local checks on this branch:
pnpm exec biome check packages/nitro/src/builders.ts packages/nitro/src/index.ts packages/nitro/src/index.test.ts workbench/nitro-v3/plugins/start-pg-world.ts .changeset/brave-pandas-route.mdpnpm exec vitest run packages/nitro/src/index.test.tspnpm --filter @workflow/nitro buildWORKFLOW_PUBLIC_MANIFEST=1 pnpm --filter @workflow/example-nitro buildNITRO_PRESET=vercel WORKFLOW_PUBLIC_MANIFEST=1 pnpm --filter @workflow/example-nitro buildpnpm vitest run packages/core/e2e/dev.test.tsRuntime/reproduction checks:
.vercel/output/config.json;/flow,/step, and/webhook/:tokenroute to Nitro's server function beforefilesystem, whileflow.funcandstep.funcremain real queue-trigger functions.3.0.260610-beta: 2 files passed, 96 passed, 6 skipped.3.0.260610-beta: 2 files passed, 95 passed, 7 skipped.main/v5 separately against Nitro3.0.260610-beta; Vercel-output and Postgres e2e both pass there, and v5 does not need a separate step route because it uses the combined flow handler.