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/9.1] Resolve DistributedApplicationResourceBuilder<ResourceWithConnectionStringSurrogate> correctly in args evaluation #7727

Merged
merged 4 commits into from
Feb 21, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 21, 2025

Backport of #7716 to release/9.1

/cc @mitchdenny @adamint

Customer Impact

Currently in .NET Aspire we have had inconsistent handling of secret parameters depending on whether it is a connection string or a regular secret parameter. This manifested in the WithArgs(...) extension method incorrectly rendering connection string args as the type name of the resource builder. This was exposed by a recent improvement to the dashboard where we suppress display of secrets.

This PR fixes the underlying issue with secret connection string resources being used as arguments to resources (this was not a regression, but an existing issue that became more obvious with the dashboard improvements).

Testing

Manual testing and added unit tests.

Risk

Low. This wasn't working previously anyway - code change is very targeted.

Regression?

@github-actions github-actions bot requested a review from mitchdenny as a code owner February 21, 2025 01:16
@mitchdenny mitchdenny added this to the 9.1 milestone Feb 21, 2025
@danmoseley danmoseley added the Servicing-approved Approved for servicing release label Feb 21, 2025
@danmoseley danmoseley requested a review from JamesNK February 21, 2025 02:50
@danmoseley danmoseley enabled auto-merge (squash) February 21, 2025 02:50
@danmoseley
Copy link
Member

@JamesNK since you're online could you be the 2nd review?

@danmoseley danmoseley merged commit 9d98476 into release/9.1 Feb 21, 2025
5 checks passed
@danmoseley danmoseley deleted the backport/pr-7716-to-release/9.1 branch February 21, 2025 03:58
Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

The code change is modest and makes sense.

There's a unit test for resolving the value for a container. I see there is an argument in the code to check whether the resource is a container or not. I assume that has some behavior impact.

Should there be a unit test to check this works for a project/exe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants