-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[release/8.0] Fix stale values from [SupplyParameterFromQuery]
#53625
Conversation
Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
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. |
Hi @MackinnonBuck. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document. |
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. |
@MackinnonBuck Thanks for your work to make this function work again. Can you make this PR merge so I (and with me many others) can use the SupplyParameterFromQuery again? Thanks in advance! |
@Hamata6 our servicing PRs get merged on a schedule sometime before the next patch release. This has already been approved, so it'll get merged in the following weeks and released in the next patch afterwards. |
Fix stale values from
[SupplyParameterFromQuery]
Backport of #53443
Fixes an issue where parameters supplied from query values may receive out-of-date values.
Description
This PR fixes the issue by checking if the URI has changed when a query parameter value gets requested, rather than relying on the
LocationChanged
event, which might execute after the router requests query parameter values.Fixes #52483
Fixes #53055
Customer Impact
Customers can't rely on the query parameter value being up to date in the
OnInitialized{Async}
orOnParametersSet{Async}()
component lifecycle events. The current workaround is to parse the current URL manually, which defeats the purpose of[SupplyParameterFromQuery]
. This is a breaking change from .NET 7, and we've received notable customer feedback that this is impactful.Regression?
Regressed from .NET 7.
Risk
We've introduced new regression tests to ensure that the bug was actually fixed. Other existing functionality is well-tested, so we can be reasonably confident this change doesn't introduce a new regression. The diff is large only because the code was moved from one place to another.
Verification
Packaging changes reviewed?