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] Introduce WithEnvironment(this, string, IResourceBuilder<IResourceWithConnectionString) #3549

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

mitchdenny
Copy link
Member

@mitchdenny mitchdenny commented Apr 10, 2024

Backporting changes from main:

Customer Impact

Improves the WithEnvironment API to allow people to inject a connection string where the receiving resource might not be using the standard .NET Core.

Testing

Unit tested. It has been in main for ~2 weeks and probably should have been in the branch in the first place.

Risk

Low. Unit tests added, doesn't interact with any default code path. But does make some other backports easier if we decide to take them.

Regression?

No

…3002 (#3239)

* Update ResourceBuilderExtensions.cs

Allow custom env var names for connection strings

Introduce a new WithEnvironment overload in ResourceBuilderExtensions that
enables setting a connection string under a custom environment variable name.

Fixes #3002.

* Update ResourceBuilderExtensions.cs

* Update ResourceBuilderExtensions.cs

* Update src/Aspire.Hosting/ResourceBuilderExtensions.cs

* Remove async keyword

* Added unit tests to verify the behavior of the WithEnvironment method

* typo fix

* verify the behavior of the WithEnvironment extension method in run mode

* Apply suggestions from code review

---------

Co-authored-by: David Fowler <davidfowl@gmail.com>
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Apr 10, 2024
@dotnet-policy-service dotnet-policy-service bot added the Servicing-consider Issue for next servicing release review label Apr 10, 2024
@danmoseley danmoseley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 10, 2024
@davidfowl davidfowl merged commit 616a666 into release/8.0 Apr 10, 2024
8 checks passed
@davidfowl davidfowl deleted the mitchdenny/backport-3239 branch April 10, 2024 07:34
@danmoseley danmoseley mentioned this pull request Apr 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants