Skip to content

Conversation

@MackinnonBuck
Copy link
Member

Fix @key not being respected for interactive WebAssembly components after publish

Backport of #53746

Fixes an issue where, after publishing a Blazor Web App, components with the InteractiveWebAssembly render mode could not receive parameter updates from SSR updates. If the component received any changed parameters, it would always get destroyed and re-initialized regardless of whether a matching @key was present.

Description

The problem was that members of ComponentMarkerKey were getting trimmed away after publish. The fix adds new trimming attributes to preserve the members of ComponentMarkerKey.

Fixes #53289

Customer Impact

Without this fix, customers will not be able to preserve component instances between enhanced page updates if any component parameters change. This includes enhanced navigations (navigating from one internal page to another), and enhanced form posts. Because this is a problem specific to publishing, customers may not realize this bug exists in their app until it's deployed.

Regression?

  • Yes
  • No

This bug is specific to apps utilizing static server rendering, which is a new feature in .NET 8.

Risk

  • High
  • Medium
  • Low

The fix is trivial and very unlikely to negatively impact other functionality.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@MackinnonBuck MackinnonBuck added Servicing-consider Shiproom approval is required for the issue area-blazor Includes: Blazor, Razor Components labels Jan 31, 2024
@MackinnonBuck MackinnonBuck requested a review from a team as a code owner January 31, 2024 23:17
@ghost
Copy link

ghost commented Jan 31, 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 31, 2024
@ghost
Copy link

ghost commented Jan 31, 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.

Copy link
Contributor

@mkArtakMSFT mkArtakMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MackinnonBuck !

@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.3 Feb 1, 2024
@rbhanda rbhanda added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Feb 1, 2024
@ghost
Copy link

ghost commented Feb 1, 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.

@wtgodbe wtgodbe merged commit a674d73 into release/8.0 Feb 6, 2024
@wtgodbe wtgodbe deleted the mbuck/backport-53746-to-8.0 branch February 6, 2024 22:30
@dotnet-policy-service dotnet-policy-service bot modified the milestone: 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.

5 participants