[pull] canary from vercel:canary#137
Merged
Merged
Conversation
When dynamicIO is enabled, missing data is encoded to an infinitely hanging promise, the absence of which we use to determine if a segment is fully static or partially static. However, when dynamicIO is not enabled, this trick doesn't work. Previously, if PPR is enabled, and dynamicIO is not, we were conservative and assumed that all segments are partial. That doesn't need to be the case, though. We can use the `onPostpone` callback of the `prerender` function to determine if a given RSC node is partial. To make sure that this works as expected, we're disabling `dynamicIO` in `test/e2e/app-dir/segment-cache/incremental-opt-in`. Without this change, the following tests would fail because additional requests for the PPR-enabled routes are triggered when `dynamicIO` is disabled: - `when a link is prefetched with <Link prefetch=true>, no dynamic request is made on navigation` - `when prefetching with prefetch=true, refetches cache entries that only contain partial data` - `when prefetching with prefetch=true, refetches partial cache entries even if there's already a pending PPR request` In addition, we're also disabling `dynamicIO` in `test/e2e/app-dir/segment-cache/client-only-opt-in` as well as `test/e2e/app-dir/segment-cache/export`, to prepare for an upcoming change where `ppr` will be enabled automatically when `dynamicIO` is enabled. Those three tests are then not compatible with `dynamicIO` because they either rely on the `'incremental'` PPR config, or on `output: 'export'`.
To prepare for an upcoming change where `ppr` will be enabled automatically when `dynamicIO` is enabled, we're disabling `dynamicIO` in the global default cache handler test, and using the `useCache` config instead, because `output: 'standalone'` is currently not compatible with PPR.
To prepare for an upcoming change where `ppr` will be enabled automatically when `dynamicIO` is enabled, we're hard coding `ppr: true` in the Dynamic IO tests with this PR. The non-PPR assertions are subsequently removed, which makes up most of the changed lines. We can now also exclude the tests in the PPR tests manifest, so that they're not run twice in CI. > [!NOTE] > This PR is best reviewed with hidden whitespace changes.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )