Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
tests/Aspire.Hosting.Tests/WithUrlsTests.cs:47
- [nitpick] The test method name 'WithUrlsCallsCallbackAfterBeforeResourceStartedEvent' is ambiguous due to the repeated 'AfterBefore' phrasing. Consider renaming it to 'WithUrlsCallsCallbackAfterResourceStartedEvent' for clarity.
public async Task WithUrlsCallsCallbackAfterBeforeResourceStartedEvent()
src/Aspire.Hosting/Dcp/ResourceSnapshotBuilder.cs:213
- The use of the null-forgiving operator on 'endpointUrl.Endpoint' assumes this property is never null. Consider adding a null-check or ensuring via code invariants that 'endpointUrl.Endpoint' is always set to avoid potential runtime exceptions.
urls.Add(new(Name: endpointUrl.Endpoint!.EndpointName, Url: endpointUrl.Url, IsInternal: false) { IsInactive = isInactive, DisplayProperties = new(endpointUrl.DisplayText ?? "", endpointUrl.DisplayOrder ?? 0) });
Member
Author
|
/backport to release/9.2 |
Contributor
|
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14321482119 |
davidfowl
reviewed
Apr 7, 2025
| private async Task OnResourceStarting(OnResourceStartingContext context) | ||
| { | ||
| // Call the callbacks to configure resource URLs | ||
| await ProcessUrls(context.Resource, context.CancellationToken).ConfigureAwait(false); |
Member
Author
There was a problem hiding this comment.
Good question given it's user code. This didn't change in this PR of course, but there's no error handling here right now. I see that the environment callback stuff doesn't handle errors in its callbacks either though.
Member
There was a problem hiding this comment.
So same experience, failed to start
davidfowl
reviewed
Apr 7, 2025
davidfowl
approved these changes
Apr 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses feedback received about using
WithUrls():BeforeResourceStartedevent processingWithUrlthat acceptReferenceExpressionand interpolated stringFixes #8587
Checklist
<remarks />and<code />elements on your triple slash comments?