Skip to content
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

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

MackinnonBuck
Copy link
Member

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} or OnParametersSet{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?

  • Yes
  • No

Regressed from .NET 7.

Risk

  • High
  • Medium
  • Low

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

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
@MackinnonBuck MackinnonBuck added Servicing-consider Shiproom approval is required for the issue area-blazor Includes: Blazor, Razor Components labels Jan 26, 2024
@MackinnonBuck MackinnonBuck requested a review from a team as a code owner January 26, 2024 01:19
@ghost
Copy link

ghost commented Jan 26, 2024

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.

@ghost ghost added this to the 8.0.x milestone Jan 26, 2024
@ghost
Copy link

ghost commented Jan 26, 2024

Hi @MackinnonBuck. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@mkArtakMSFT mkArtakMSFT added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 26, 2024
@ghost
Copy link

ghost commented Jan 26, 2024

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.

@Hamata6
Copy link

Hamata6 commented Feb 5, 2024

@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!

@javiercn
Copy link
Member

javiercn commented Feb 5, 2024

@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.

@wtgodbe wtgodbe merged commit 16b8837 into release/8.0 Feb 6, 2024
26 checks passed
@wtgodbe wtgodbe deleted the mbuck/backport-53443 branch February 6, 2024 22:30
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 8.0.x, 8.0.3 Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Servicing-approved Shiproom has approved the issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants