-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[release/8.0] [Blazor] Defer enhanced component updates until reconnection circuit completes #51242
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
Conversation
Hi @MackinnonBuck. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
src/Components/test/E2ETest/ServerRenderingTests/EndpointsServerReconnectionTest.cs
Outdated
Show resolved
Hide resolved
src/Components/Server/src/Circuits/CircuitRootComponentOperationBatch.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand the main ideas here and it seems reasonable to me.
It still seems as if state could be left hanging in edge cases (e.g., if the EndUpdateRootComponents
message gets dropped, the client may think a root still exists but the server does not) but since that's only used for client-side cleanup that's not catastrophic.
Hi @MackinnonBuck. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
Yep, this is definitely something that can happen. In the future, we could consider a mechanism to detect if the circuit disconnects while a set of root component operations are being applied and somehow react to that. |
Defer enhanced component updates until reconnection circuit completes
Ensures that enhanced updates to interactive server components get deferred until the circuit is reconnected.
Description
This PR includes two changes:
Fixes #51082
Customer Impact
This change impacts Blazor Web scenarios where interactive server components exist on the page.
With this fix, it's more likely that a customer with an unstable connection will be able to continue using the app without refreshing the page. In particular:
Regression?
These fixes only affect "Blazor Web" scenarios, which are new in .NET 8.
Risk
This is a moderately-sized change. However, we have existing automated tests that verify the scenarios that this code is likely to impact, and we've added new tests to help ensure that these fixes introduce the above stability improvements.
Verification
Packaging changes reviewed?