-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[backport] Fix/dedupe fetch clone #73532
Conversation
Failing test suitesCommit: 205e85f
Expand output● app-fetch-deduping › during static generation › dedupes requests amongst static workers when experimental.staticWorkerRequestDeduping is enabled
Read more about building and testing Next.js in contributing.md.
Expand output● custom-app-server-action-redirect › redirects with basepath properly when server action handler uses
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir - logging › with fetches verbose logging › should only log requests in development mode
● app-dir - logging › with fetches default logging › should only log requests in development mode
● app-dir - logging › with fetches default logging › should only log requests in development mode
● app-dir - logging › with verbose logging for edge runtime › should not log fetch requests at all
● app-dir - logging › with verbose logging for edge runtime › should not log fetch requests at all
● app-dir - logging › with default logging › should not log fetch requests at all
● app-dir - logging › with default logging › should not log fetch requests at all
● Test suite failed to run
● Test suite failed to run
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir action size limit invalid config › should error if serverActions.bodySizeLimit config is a negative number
● app-dir action size limit invalid config › should error if serverActions.bodySizeLimit config is invalid
● app-dir action size limit invalid config › should error if serverActions.bodySizeLimit config is a negative size
● app-dir action size limit invalid config › should respect the size set in serverActions.bodySizeLimit
● app-dir action size limit invalid config › should respect the size set in serverActions.bodySizeLimit when submitting form
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir static/dynamic handling › should still cache even though the
● app-dir static/dynamic handling › should still cache even though the
● app-dir static/dynamic handling › should warn for too many cache tags
● app-dir static/dynamic handling › should warn for too many cache tags
● app-dir static/dynamic handling › should propagate unstable_cache tags correctly
● app-dir static/dynamic handling › should propagate unstable_cache tags correctly
● app-dir static/dynamic handling › should honor force-static with fetch cache: no-store correctly
● app-dir static/dynamic handling › should honor force-static with fetch cache: no-store correctly
● app-dir static/dynamic handling › should correctly include headers instance in cache key
● app-dir static/dynamic handling › should correctly include headers instance in cache key
● app-dir static/dynamic handling › should correctly de-dupe fetch without next cache /react-fetch-deduping-node
● app-dir static/dynamic handling › should correctly de-dupe fetch without next cache /react-fetch-deduping-node
● app-dir static/dynamic handling › should correctly de-dupe fetch without next cache /react-fetch-deduping-edge
● app-dir static/dynamic handling › should correctly de-dupe fetch without next cache /react-fetch-deduping-edge
● app-dir static/dynamic handling › unstable-cache should work in pages/unstable-cache-node
● app-dir static/dynamic handling › unstable-cache should work in pages/unstable-cache-node
● app-dir static/dynamic handling › unstable-cache should work in pages/unstable-cache-edge
● app-dir static/dynamic handling › unstable-cache should work in pages/unstable-cache-edge
● app-dir static/dynamic handling › unstable-cache should work in pages/api/unstable-cache-node
● app-dir static/dynamic handling › unstable-cache should work in pages/api/unstable-cache-node
● app-dir static/dynamic handling › unstable-cache should work in pages/api/unstable-cache-edge
● app-dir static/dynamic handling › unstable-cache should work in pages/api/unstable-cache-edge
● app-dir static/dynamic handling › should not have cache tags header for non-minimal mode
● app-dir static/dynamic handling › should not have cache tags header for non-minimal mode
● app-dir static/dynamic handling › should correctly skip caching POST fetch for POST handler
● app-dir static/dynamic handling › should correctly skip caching POST fetch for POST handler
● app-dir static/dynamic handling › should properly revalidate a route handler that triggers dynamic usage with force-static
● app-dir static/dynamic handling › should properly revalidate a route handler that triggers dynamic usage with force-static
● app-dir static/dynamic handling › it should revalidate tag correctly with edge route handler
● app-dir static/dynamic handling › it should revalidate tag correctly with edge route handler
● app-dir static/dynamic handling › it should revalidate tag correctly with node route handler
● app-dir static/dynamic handling › it should revalidate tag correctly with node route handler
● app-dir static/dynamic handling › should not revalidate / when revalidate is not used
● app-dir static/dynamic handling › should not revalidate / when revalidate is not used
● app-dir static/dynamic handling › it should revalidate correctly with edge route handler
● app-dir static/dynamic handling › it should revalidate correctly with edge route handler
● app-dir static/dynamic handling › it should revalidate correctly with node route handler
● app-dir static/dynamic handling › it should revalidate correctly with node route handler
● app-dir static/dynamic handling › should revalidate all fetches during on-demand revalidate
● app-dir static/dynamic handling › should revalidate all fetches during on-demand revalidate
● app-dir static/dynamic handling › should correctly handle fetchCache = "force-no-store"
● app-dir static/dynamic handling › should correctly handle fetchCache = "force-no-store"
● app-dir static/dynamic handling › should revalidate correctly with config and fetch revalidate
● app-dir static/dynamic handling › should revalidate correctly with config and fetch revalidate
● app-dir static/dynamic handling › should not cache non-ok statusCode
● app-dir static/dynamic handling › should not cache non-ok statusCode
● app-dir static/dynamic handling › should have deterministic etag across revalidates
● app-dir static/dynamic handling › should have deterministic etag across revalidates
● app-dir static/dynamic handling › should output HTML/RSC files for static paths
● app-dir static/dynamic handling › should output HTML/RSC files for static paths
● app-dir static/dynamic handling › should have correct prerender-manifest entries
● app-dir static/dynamic handling › should have correct prerender-manifest entries
● app-dir static/dynamic handling › should output debug info for static bailouts
● app-dir static/dynamic handling › should output debug info for static bailouts
● app-dir static/dynamic handling › should correctly error and not update cache for ISR
● app-dir static/dynamic handling › should correctly error and not update cache for ISR
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving/app-page
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving/app-page
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving/route-handler
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving/route-handler
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving-edge/app-page
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving-edge/app-page
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving-edge/route-handler
● app-dir static/dynamic handling › should stream properly for /stale-cache-serving-edge/route-handler
● app-dir static/dynamic handling › should correctly handle statusCode with notFound + ISR
● app-dir static/dynamic handling › should correctly handle statusCode with notFound + ISR
● app-dir static/dynamic handling › should cache correctly for fetchCache = default-cache
● app-dir static/dynamic handling › should cache correctly for fetchCache = default-cache
● app-dir static/dynamic handling › should cache correctly for fetchCache = force-cache
● app-dir static/dynamic handling › should cache correctly for fetchCache = force-cache
● app-dir static/dynamic handling › should cache correctly for cache: no-store
● app-dir static/dynamic handling › should cache correctly for cache: no-store
● app-dir static/dynamic handling › should not error with dynamic server usage with force-static
● app-dir static/dynamic handling › should not error with dynamic server usage with force-static
● app-dir static/dynamic handling › should produce response with url from fetch
● app-dir static/dynamic handling › should produce response with url from fetch
● app-dir static/dynamic handling › should properly error when dynamic = "error" page uses dynamic
● app-dir static/dynamic handling › should properly error when dynamic = "error" page uses dynamic
● app-dir static/dynamic handling › should skip cache in draft mode
● app-dir static/dynamic handling › should skip cache in draft mode
● app-dir static/dynamic handling › should handle partial-gen-params with default dynamicParams correctly
● app-dir static/dynamic handling › should handle partial-gen-params with default dynamicParams correctly
● app-dir static/dynamic handling › should handle partial-gen-params with layout dynamicParams = false correctly
● app-dir static/dynamic handling › should handle partial-gen-params with layout dynamicParams = false correctly
● app-dir static/dynamic handling › should handle partial-gen-params with page dynamicParams = false correctly
● app-dir static/dynamic handling › should handle partial-gen-params with page dynamicParams = false correctly
● app-dir static/dynamic handling › should honor fetch cache in generateStaticParams
● app-dir static/dynamic handling › should honor fetch cache in generateStaticParams
● app-dir static/dynamic handling › should honor fetch cache correctly
● app-dir static/dynamic handling › should honor fetch cache correctly
● app-dir static/dynamic handling › should honor fetch cache correctly (edge)
● app-dir static/dynamic handling › should honor fetch cache correctly (edge)
● app-dir static/dynamic handling › should cache correctly with authorization header and revalidate
● app-dir static/dynamic handling › should cache correctly with authorization header and revalidate
● app-dir static/dynamic handling › should skip fetch cache when an authorization header is present after dynamic usage
● app-dir static/dynamic handling › should skip fetch cache when an authorization header is present after dynamic usage
● app-dir static/dynamic handling › should skip fetch cache when accessing request properties
● app-dir static/dynamic handling › should skip fetch cache when accessing request properties
● app-dir static/dynamic handling › should not cache correctly with POST method request init
● app-dir static/dynamic handling › should not cache correctly with POST method request init
● app-dir static/dynamic handling › should cache correctly with post method and revalidate
● app-dir static/dynamic handling › should cache correctly with post method and revalidate
● app-dir static/dynamic handling › should cache correctly with post method and revalidate edge
● app-dir static/dynamic handling › should cache correctly with post method and revalidate edge
● app-dir static/dynamic handling › should cache correctly with POST method and revalidate
● app-dir static/dynamic handling › should cache correctly with POST method and revalidate
● app-dir static/dynamic handling › should cache correctly with cookie header and revalidate
● app-dir static/dynamic handling › should cache correctly with cookie header and revalidate
● app-dir static/dynamic handling › should cache correctly with utf8 encoding
● app-dir static/dynamic handling › should cache correctly with utf8 encoding
● app-dir static/dynamic handling › should cache correctly with utf8 encoding edge
● app-dir static/dynamic handling › should cache correctly with utf8 encoding edge
● app-dir static/dynamic handling › should cache correctly handle JSON body
● app-dir static/dynamic handling › should cache correctly handle JSON body
● app-dir static/dynamic handling › should not throw Dynamic Server Usage error when using generateStaticParams with draftMode
● app-dir static/dynamic handling › should not throw Dynamic Server Usage error when using generateStaticParams with draftMode
● app-dir static/dynamic handling › should force SSR correctly for headers usage
● app-dir static/dynamic handling › should force SSR correctly for headers usage
● app-dir static/dynamic handling › should allow dynamic routes to access cookies
● app-dir static/dynamic handling › should allow dynamic routes to access cookies
● app-dir static/dynamic handling › should not error with generateStaticParams and dynamic data
● app-dir static/dynamic handling › should not error with generateStaticParams and dynamic data
● app-dir static/dynamic handling › should not error with force-dynamic and catch-all routes
● app-dir static/dynamic handling › should not error with force-dynamic and catch-all routes
● app-dir static/dynamic handling › should not error with generateStaticParams and authed data on revalidate
● app-dir static/dynamic handling › should not error with generateStaticParams and authed data on revalidate
● app-dir static/dynamic handling › should honor dynamic = "force-static" correctly
● app-dir static/dynamic handling › should honor dynamic = "force-static" correctly
● app-dir static/dynamic handling › should honor dynamic = "force-static" correctly (lazy)
● app-dir static/dynamic handling › should honor dynamic = "force-static" correctly (lazy)
● app-dir static/dynamic handling › should handle dynamicParams: false correctly
● app-dir static/dynamic handling › should handle dynamicParams: false correctly
● app-dir static/dynamic handling › should work with forced dynamic path
● app-dir static/dynamic handling › should work with forced dynamic path
● app-dir static/dynamic handling › should work with dynamic path no generateStaticParams
● app-dir static/dynamic handling › should work with dynamic path no generateStaticParams
● app-dir static/dynamic handling › should handle dynamicParams: true correctly
● app-dir static/dynamic handling › should handle dynamicParams: true correctly
● app-dir static/dynamic handling › should navigate to static path correctly
● app-dir static/dynamic handling › should navigate to static path correctly
● app-dir static/dynamic handling › should ssr dynamically when detected automatically with fetch cache option
● app-dir static/dynamic handling › should ssr dynamically when detected automatically with fetch cache option
● app-dir static/dynamic handling › should render not found pages correctly and fallback to the default one
● app-dir static/dynamic handling › should render not found pages correctly and fallback to the default one
● app-dir static/dynamic handling › should ssr dynamically when detected automatically with fetch revalidate option
● app-dir static/dynamic handling › should ssr dynamically when detected automatically with fetch revalidate option
● app-dir static/dynamic handling › should ssr dynamically when forced via config
● app-dir static/dynamic handling › should ssr dynamically when forced via config
● app-dir static/dynamic handling › useSearchParams › client › should bailout to client rendering - with suspense boundary
● app-dir static/dynamic handling › useSearchParams › client › should bailout to client rendering - with suspense boundary
● app-dir static/dynamic handling › useSearchParams › client › should have empty search params on force-static
● app-dir static/dynamic handling › useSearchParams › client › should have empty search params on force-static
● app-dir static/dynamic handling › useSearchParams › client › should have values from canonical url on rewrite
● app-dir static/dynamic handling › useSearchParams › client › should have values from canonical url on rewrite
● app-dir static/dynamic handling › useSearchParams › server response › should bailout to client rendering - with suspense boundary
● app-dir static/dynamic handling › useSearchParams › server response › should bailout to client rendering - with suspense boundary
● app-dir static/dynamic handling › useSearchParams › server response › should have empty search params on force-static
● app-dir static/dynamic handling › useSearchParams › server response › should have empty search params on force-static
● app-dir static/dynamic handling › usePathname › should have the correct values
● app-dir static/dynamic handling › usePathname › should have the correct values
● app-dir static/dynamic handling › usePathname › should have values from canonical url on rewrite
● app-dir static/dynamic handling › usePathname › should have values from canonical url on rewrite
● app-dir static/dynamic handling › unstable_noStore › should opt-out of static optimization
● app-dir static/dynamic handling › unstable_noStore › should opt-out of static optimization
● app-dir static/dynamic handling › unstable_noStore › should not opt-out of static optimization when used in next/cache
● app-dir static/dynamic handling › unstable_noStore › should not opt-out of static optimization when used in next/cache
● app-dir static/dynamic handling › unstable_cache › should retrieve the same value on second request
● app-dir static/dynamic handling › unstable_cache › should retrieve the same value on second request
● app-dir static/dynamic handling › unstable_cache › should bypass cache in draft mode
● app-dir static/dynamic handling › unstable_cache › should bypass cache in draft mode
● app-dir static/dynamic handling › unstable_cache › should not cache new result in draft mode
● app-dir static/dynamic handling › unstable_cache › should not cache new result in draft mode
● app-dir static/dynamic handling › unstable_cache › should not error when retrieving the value undefined
● app-dir static/dynamic handling › unstable_cache › should not error when retrieving the value undefined
● app-dir static/dynamic handling › should keep querystring on static page
● app-dir static/dynamic handling › should keep querystring on static page
● app-dir static/dynamic handling › Incremental cache limits › should load data only at build time even if response data size is greater than 2MB and FetchCache is possible
● app-dir static/dynamic handling › Incremental cache limits › should load data only at build time even if response data size is greater than 2MB and FetchCache is possible
● app-dir static/dynamic handling › should build dynamic param with edge runtime correctly
● app-dir static/dynamic handling › should build dynamic param with edge runtime correctly
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - metadata dynamic routes › social image routes › should render og image with twitter-image dynamic routes
● app dir - metadata dynamic routes › social image routes › should handle custom fonts in both edge and nodejs runtime
● app dir - metadata dynamic routes › should generate unique path for image routes under group routes
Read more about building and testing Next.js in contributing.md.
Expand output● ppr › /no-suspense/node/gsp/[slug] › should serve the static & dynamic parts
Read more about building and testing Next.js in contributing.md. |
Stats from current PRDefault Build (Increase detected
|
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
buildDuration | 15.5s | 13.8s | N/A |
buildDurationCached | 7.7s | 6.7s | N/A |
nodeModulesSize | 200 MB | 201 MB | |
nextStartRea..uration (ms) | 408ms | 411ms | N/A |
Client Bundles (main, webpack)
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
1a9f679d-HASH.js gzip | 53.7 kB | 53.7 kB | N/A |
5428.HASH.js gzip | 181 B | 180 B | N/A |
6067-HASH.js gzip | 5.06 kB | 5.06 kB | N/A |
6428-HASH.js gzip | 31.6 kB | 31.6 kB | N/A |
framework-HASH.js gzip | 44.9 kB | 44.9 kB | ✓ |
main-app-HASH.js gzip | 242 B | 244 B | N/A |
main-HASH.js gzip | 32.3 kB | 32.3 kB | N/A |
webpack-HASH.js gzip | 1.68 kB | 1.68 kB | N/A |
Overall change | 44.9 kB | 44.9 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 39.4 kB | 39.4 kB | ✓ |
Overall change | 39.4 kB | 39.4 kB | ✓ |
Client Pages
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
_app-HASH.js gzip | 196 B | 196 B | ✓ |
_error-HASH.js gzip | 184 B | 185 B | N/A |
amp-HASH.js gzip | 502 B | 504 B | N/A |
css-HASH.js gzip | 321 B | 324 B | N/A |
dynamic-HASH.js gzip | 1.82 kB | 1.82 kB | N/A |
edge-ssr-HASH.js gzip | 258 B | 257 B | N/A |
head-HASH.js gzip | 352 B | 352 B | ✓ |
hooks-HASH.js gzip | 371 B | 372 B | N/A |
image-HASH.js gzip | 4.23 kB | 4.23 kB | N/A |
index-HASH.js gzip | 259 B | 257 B | N/A |
link-HASH.js gzip | 2.67 kB | 2.68 kB | N/A |
routerDirect..HASH.js gzip | 316 B | 314 B | N/A |
script-HASH.js gzip | 385 B | 386 B | N/A |
withRouter-HASH.js gzip | 311 B | 310 B | N/A |
1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
Overall change | 654 B | 654 B | ✓ |
Client Build Manifests
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
_buildManifest.js gzip | 483 B | 481 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
index.html gzip | 529 B | 527 B | N/A |
link.html gzip | 542 B | 539 B | N/A |
withRouter.html gzip | 524 B | 523 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Edge SSR bundle Size
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
edge-ssr.js gzip | 95.5 kB | 95.5 kB | N/A |
page.js gzip | 3.06 kB | 3.07 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Middleware size
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
middleware-b..fest.js gzip | 656 B | 656 B | ✓ |
middleware-r..fest.js gzip | 156 B | 154 B | N/A |
middleware.js gzip | 25.5 kB | 25.5 kB | N/A |
edge-runtime..pack.js gzip | 839 B | 839 B | ✓ |
Overall change | 1.5 kB | 1.5 kB | ✓ |
Next Runtimes Overall increase ⚠️
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
app-page-exp...dev.js gzip | 171 kB | 171 kB | ✓ |
app-page-exp..prod.js gzip | 98.3 kB | 98.3 kB | ✓ |
app-page-tur..prod.js gzip | 100 kB | 100 kB | ✓ |
app-page-tur..prod.js gzip | 94.3 kB | 94.3 kB | ✓ |
app-page.run...dev.js gzip | 145 kB | 145 kB | ✓ |
app-page.run..prod.js gzip | 92.8 kB | 92.8 kB | ✓ |
app-route-ex...dev.js gzip | 22.1 kB | 22.5 kB | |
app-route-ex..prod.js gzip | 15.5 kB | 15.9 kB | |
app-route-tu..prod.js gzip | 15.5 kB | 15.9 kB | |
app-route-tu..prod.js gzip | 15.2 kB | 15.6 kB | |
app-route.ru...dev.js gzip | 21.7 kB | 22.2 kB | |
app-route.ru..prod.js gzip | 15.2 kB | 15.6 kB | |
pages-api-tu..prod.js gzip | 9.58 kB | 9.58 kB | ✓ |
pages-api.ru...dev.js gzip | 9.85 kB | 9.85 kB | ✓ |
pages-api.ru..prod.js gzip | 9.57 kB | 9.57 kB | ✓ |
pages-turbo...prod.js gzip | 22.5 kB | 22.5 kB | ✓ |
pages.runtim...dev.js gzip | 23.2 kB | 23.2 kB | ✓ |
pages.runtim..prod.js gzip | 22.5 kB | 22.5 kB | ✓ |
server.runti..prod.js gzip | 51.6 kB | 51.6 kB | ✓ |
Overall change | 956 kB | 959 kB |
build cache Overall increase ⚠️
vercel/next.js 14-2-1 | vercel/next.js fix/dedupe-fetch-clone | Change | |
---|---|---|---|
0.pack gzip | 1.61 MB | 1.63 MB | |
index.pack gzip | 113 kB | 114 kB | |
Overall change | 1.72 MB | 1.74 MB |
Diff details
Diff for middleware.js
Diff too large to display
Diff for edge-ssr.js
Diff too large to display
Diff for app-route-ex..ntime.dev.js
Diff too large to display
Diff for app-route-ex..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route.runtime.dev.js
Diff too large to display
Diff for app-route.ru..time.prod.js
Diff too large to display
Amazing needed this, it was very annoying! And kept rate limiting |
This is a backport of #73274 which resolves a bug with response cloning.