Skip to content

(cherrypick) [Flight Reply] Reject any new Chunks not yet discovered at the time of reportGlobalError (#31840) #31872

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

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented Dec 20, 2024

We might have already resolved models that are not pending and so are not rejected by aborting the stream. When those later get parsed they might discover new chunks which end up as pending. These should be errored since they will never be able to resolve later.

This avoids infinitely hanging the stream.

This same fix needs to be ported to ReactFlightClient that has the same issue.

…f reportGlobalError (facebook#31840)

We might have already resolved models that are not pending and so are
not rejected by aborting the stream. When those later get parsed they
might discover new chunks which end up as pending. These should be
errored since they will never be able to resolve later.

This avoids infinitely hanging the stream.

This same fix needs to be ported to ReactFlightClient that has the same
issue.
Copy link

vercel bot commented Dec 20, 2024

@sebmarkbage is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 20, 2024
@gnoff gnoff requested a review from sebmarkbage December 20, 2024 17:00
@gnoff gnoff merged commit 720de7f into facebook:sync-nextjs-13 Dec 20, 2024
2 of 4 checks passed
ztanner added a commit to vercel/next.js that referenced this pull request Dec 21, 2024
Update React from d900fadbf to 1dba980e1f.

### React upstream changes

- facebook/react#31881
- facebook/react#31872

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants