Enable PPR tests for test suites#58708
Conversation
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
Stats from current PRDefault Build (Increase detected
|
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| buildDuration | 10.7s | 11s | |
| buildDurationCached | 6.2s | 6.1s | N/A |
| nodeModulesSize | 199 MB | 199 MB | |
| nextStartRea..uration (ms) | 429ms | 425ms | N/A |
Client Bundles (main, webpack)
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| 199-HASH.js gzip | 28.7 kB | 28.7 kB | N/A |
| 3f784ff6-HASH.js gzip | 53.3 kB | 53.3 kB | ✓ |
| 494.HASH.js gzip | 180 B | 181 B | N/A |
| framework-HASH.js gzip | 45.2 kB | 45.2 kB | ✓ |
| main-app-HASH.js gzip | 241 B | 239 B | N/A |
| main-HASH.js gzip | 31.7 kB | 31.7 kB | N/A |
| webpack-HASH.js gzip | 1.7 kB | 1.7 kB | ✓ |
| Overall change | 100 kB | 100 kB | ✓ |
Legacy Client Bundles (polyfills)
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| polyfills-HASH.js gzip | 31 kB | 31 kB | ✓ |
| Overall change | 31 kB | 31 kB | ✓ |
Client Pages
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| _app-HASH.js gzip | 194 B | 195 B | N/A |
| _error-HASH.js gzip | 182 B | 181 B | N/A |
| amp-HASH.js gzip | 501 B | 503 B | N/A |
| css-HASH.js gzip | 322 B | 323 B | N/A |
| dynamic-HASH.js gzip | 2.5 kB | 2.5 kB | ✓ |
| edge-ssr-HASH.js gzip | 253 B | 255 B | N/A |
| head-HASH.js gzip | 348 B | 347 B | N/A |
| hooks-HASH.js gzip | 369 B | 368 B | N/A |
| image-HASH.js gzip | 4.28 kB | 4.27 kB | N/A |
| index-HASH.js gzip | 256 B | 256 B | ✓ |
| link-HASH.js gzip | 2.61 kB | 2.6 kB | N/A |
| routerDirect..HASH.js gzip | 311 B | 311 B | ✓ |
| script-HASH.js gzip | 384 B | 383 B | N/A |
| withRouter-HASH.js gzip | 307 B | 308 B | N/A |
| 1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
| Overall change | 3.17 kB | 3.17 kB | ✓ |
Client Build Manifests
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| _buildManifest.js gzip | 484 B | 483 B | N/A |
| Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| index.html gzip | 529 B | 527 B | N/A |
| link.html gzip | 539 B | 540 B | N/A |
| withRouter.html gzip | 522 B | 522 B | ✓ |
| Overall change | 522 B | 522 B | ✓ |
Edge SSR bundle Size Overall increase ⚠️
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| edge-ssr.js gzip | 92.4 kB | 92.4 kB | N/A |
| page.js gzip | 145 kB | 145 kB | |
| Overall change | 145 kB | 145 kB |
Middleware size
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| middleware-b..fest.js gzip | 626 B | 626 B | ✓ |
| middleware-r..fest.js gzip | 150 B | 151 B | N/A |
| middleware.js gzip | 24.8 kB | 24.8 kB | N/A |
| edge-runtime..pack.js gzip | 1.92 kB | 1.92 kB | ✓ |
| Overall change | 2.55 kB | 2.55 kB | ✓ |
Next Runtimes Overall increase ⚠️
| vercel/next.js canary | vercel/next.js tests/expand-test-suites-for-ppr | Change | |
|---|---|---|---|
| app-page-exp...dev.js gzip | 167 kB | 167 kB | |
| app-page-exp..prod.js gzip | 93.3 kB | 93.5 kB | |
| app-page-tur..prod.js gzip | 94 kB | 94.3 kB | |
| app-page-tur..prod.js gzip | 88.6 kB | 88.9 kB | |
| app-page.run...dev.js gzip | 137 kB | 137 kB | |
| app-page.run..prod.js gzip | 87.9 kB | 88.2 kB | |
| app-route-ex...dev.js gzip | 23.8 kB | 23.8 kB | N/A |
| app-route-ex..prod.js gzip | 16.4 kB | 16.4 kB | N/A |
| app-route-tu..prod.js gzip | 16.5 kB | 16.4 kB | N/A |
| app-route-tu..prod.js gzip | 16 kB | 16 kB | N/A |
| app-route.ru...dev.js gzip | 23.2 kB | 23.2 kB | N/A |
| app-route.ru..prod.js gzip | 16 kB | 16 kB | N/A |
| pages-api-tu..prod.js gzip | 9.37 kB | 9.37 kB | ✓ |
| pages-api.ru...dev.js gzip | 9.64 kB | 9.64 kB | ✓ |
| pages-api.ru..prod.js gzip | 9.37 kB | 9.37 kB | ✓ |
| pages-turbo...prod.js gzip | 21.8 kB | 21.9 kB | N/A |
| pages.runtim...dev.js gzip | 22.5 kB | 22.5 kB | N/A |
| pages.runtim..prod.js gzip | 21.8 kB | 21.9 kB | N/A |
| server.runti..prod.js gzip | 49.1 kB | 49.1 kB | N/A |
| Overall change | 696 kB | 698 kB |
Diff details
Diff for page.js
Diff too large to display
Diff for edge-ssr.js
Diff too large to display
Diff for 199-HASH.js
Diff too large to display
Diff for app-page-exp..ntime.dev.js
Diff too large to display
Diff for app-page-exp..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page.runtime.dev.js
Diff too large to display
Diff for app-page.runtime.prod.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
Diff for pages-turbo...time.prod.js
Diff too large to display
Diff for pages.runtime.dev.js
Diff too large to display
Diff for pages.runtime.prod.js
Diff too large to display
Diff for server.runtime.prod.js
Diff too large to display
79411ee to
baa8746
Compare
Tests Passed |
3e3d029 to
f8821a4
Compare
|
Notifying the following users due to files changed in this PR based on this repo's notify modifiers: @timneutkens, @ijjk, @shuding, @huozhi: |
|
I'm surprised this is all green for parallel routes and interception, can you double-check @wyattjoh ? otherwise, this is extremely good news |
44843b7 to
a210699
Compare
| } else if (isAppPageRouteModule(routeModule)) { | ||
| if ( | ||
| !opts.experimental.ppr && | ||
| !renderOpts.experimental.ppr && |
There was a problem hiding this comment.
The rest of the render code inspects the renderOpts object which is the merged opts + other spreads. This just brings it in-line to be accessing the same instance rather than this one which was technically accessing a higher instance. In an ideal world, the construction of renderOpts would occur out of scope of this function such that it just gets the "complete" version.
| isrFlushToDisk: this.nextConfig.experimental.isrFlushToDisk, | ||
| maxMemoryCacheSize: this.nextConfig.experimental.isrMemoryCacheSize, | ||
| ppr: this.nextConfig.experimental.ppr === true, | ||
| ppr: this.renderOpts.experimental.ppr, |
There was a problem hiding this comment.
also wondering why this is changing. At first glance to me it seems like a bug that everything else reads from this.nextConfig.experimental except for this property
There was a problem hiding this comment.
Because the enablement of PPR is dependant on the runtime + page kind, the experimental object was added to RenderOpts within app, enabling us to scope down the usage of renderOpts to specific page types. Ideally, we'd want to scope down access of each of the config options to each of the specific route implementaitons and runtimes.
In the most ideal world, we wouldn't pass around these huge bag-of-properties and instead rely on DI/IOC to isolate the configuration passing to the specific functions/classes/modules that require specific information from the configuration/render layers. That would solve the problem of PPR changes leaking into and breaking pages running inside pages/.
d93b41f to
4cc0557
Compare
4cc0557 to
a2e7e3d
Compare
3c14d7a to
1a06780
Compare
Co-authored-by: Zack Tanner <[email protected]>
77b2404 to
4118b3b
Compare
1009358 to
f46c895
Compare
a89b157 to
628b0bb
Compare
628b0bb to
5a94e70
Compare
a5b16d0 to
dc4c574
Compare
dc4c574 to
fec438b
Compare
Cherry-picks #58708 without the dependency on #58779 Co-authored-by: Wyatt Johnson <[email protected]>
|
Closing since #59030 landed |

This adds a new set of test suites that enable PPR by default to catch regressions on the app directory. Once PPR is the default, these test suites can be deleted.
This also introduces a slight variant to the test manifest file format to have it opt-in by default rather than opt-out. This is signaled by the
"version": 2added to the manifest.The test coverage can be debugged with the following script: https://gist.github.com/wyattjoh/331240e1dd9fd913a2412f9cb9c0de54