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

Add optional serviceName parameter to WithReference methods #4111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

paulomorgado
Copy link

@paulomorgado paulomorgado commented May 7, 2024

Updated the WithReference methods in ResourceBuilderExtensions.cs to include an optional serviceName parameter for overriding the source resource's name for the service name. The ApplyEndpoints and CreateEndpointReferenceEnvironmentPopulationCallback methods have been updated to use this new parameter. Updated and added tests in WithReferenceTests.cs to cover these changes. The PublicAPI.Unshipped.txt file has also been updated to reflect these changes.

Closes #4109

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label May 7, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label May 7, 2024
@paulomorgado paulomorgado force-pushed the service-name branch 2 times, most recently from 43d1269 to c41a7e9 Compare May 7, 2024 19:02
@davidfowl
Copy link
Member

Can't make breaking changes like this now. Add an overload.

Updated the `WithReference` methods in `ResourceBuilderExtensions.cs` to include an optional `serviceName` parameter for overriding the source resource's name for the service name. The `ApplyEndpoints` and `CreateEndpointReferenceEnvironmentPopulationCallback` methods have been updated to use this new parameter. Updated and added tests in `WithReferenceTests.cs` to cover these changes. The `PublicAPI.Unshipped.txt` file has also been updated to reflect these changes.
@paulomorgado
Copy link
Author

Can't make breaking changes like this now. Add an overload.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow specifying service name with WithReference from IResourceWithServiceDiscovery and EndpointReference
2 participants