Remove Server Action forwarding - #96951
Conversation
Failing test suitesCommit: 9d50cbb | About building and testing Next.js
Expand output● actions-tree-shaking - reexport › should keep all the action exports for namespace export case on client layer
Expand output● actions-tree-shaking - reexport › should keep all the action exports for namespace export case on client layer |
Stats from current PR🔴 4 regressions
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (27 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsfailed to diffapp-page-exp..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page.runtime.dev.jsfailed to diffapp-page.runtime.prod.jsfailed to diffapp-route-ex..ntime.dev.jsDiff too large to display app-route-ex..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route.runtime.dev.jsDiff too large to display app-route.ru..time.prod.jsDiff too large to display dev-validati..ntime.dev.jsDiff too large to display dev-validati..ntime.dev.jsDiff too large to display dev-validati..ntime.dev.jsDiff too large to display dev-validati..ntime.dev.jsDiff too large to display server.runtime.prod.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display pages-api-tu..ntime.dev.jsDiff too large to display pages-turbo...ntime.dev.jsDiff too large to display 📎 Tarball URLCommit: 9d50cbb |
a61b85b to
9d50cbb
Compare
| } | ||
| } | ||
| } | ||
| isActionOnlyRequest || isActionOnlyFallbackRequest |
Summary
Today, when a Server Action request reaches a route whose worker does not bundle that action, Next.js consults the Server Action manifest and internally forwards the request to another worker. It has caused correctness issues and miscellaneous bugs because the action executes under a different route and request context.
The preceding PR adds direct action dispatch: the client learns which route owns an action and sends the request directly to that route.
With direct dispatch in place, this removes the internal forwarding request, worker-selection logic, and
x-action-forwardedhandling. A valid action sent to the wrong route now returns the standard action-not-found response instead of being forwarded.Supersedes #90549