Skip to content

[release/13.0] Fix Azure roles resources always redeploying - #12903

Merged
Jose Perez Rodriguez (joperezr) merged 2 commits into
release/13.0from
backport/pr-12901-to-release/13.0
Nov 20, 2025
Merged

[release/13.0] Fix Azure roles resources always redeploying#12903
Jose Perez Rodriguez (joperezr) merged 2 commits into
release/13.0from
backport/pr-12901-to-release/13.0

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

Backport of #12901 to release/13.0

/cc Eric Erhardt (@eerhardt)

Customer Impact

When someone has Azure resources in their app, the "roles" resource is getting redeployed each time the app is run locally. This slows down the dev's inner loop.

Testing

Manually tested the roles resource is cached correctly. Also added a new unit test for the scenario.

Risk

Low. The fix is bringing parts of code that shipped earlier in Aspire 9.5.

Regression?

Yes

@github-actions

github-actions Bot commented Nov 11, 2025

Copy link
Copy Markdown
Contributor Author

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12903

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12903"

Everytime we check if we need to redeploy an Azure "roles" resource in run mode, we are getting a different CheckSum. This is because we are overwriting the "known parameters" like PrincipalId and PrincipalType with 'null' values, because these values aren't available yet.

The fix is to skip setting those known parameters, like we did in previous versions.

Fix #12651
@github-actions
github-actions Bot force-pushed the backport/pr-12901-to-release/13.0 branch from 4088ae3 to 8480d9d Compare November 11, 2025 19:42
@eerhardt Eric Erhardt (eerhardt) added the Servicing-consider Issue for next servicing release review label Nov 11, 2025
@davidfowl

Copy link
Copy Markdown
Contributor

Eric Erhardt (@eerhardt) who sets skipKnownValues to true?

@eerhardt

Eric Erhardt (eerhardt) commented Nov 12, 2025

Copy link
Copy Markdown
Member

Eric Erhardt (@eerhardt) who sets skipKnownValues to true?

The only place it gets set to true is in GetCurrentChecksumAsync(AzureBicepResource resource, IConfiguration section, CancellationToken cancellationToken = default).

The other caller is in BicepProvisioner.GetOrCreateResourceAsync, and this doesn't pass skipKnownValues.

This was referenced Dec 17, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants