-
Notifications
You must be signed in to change notification settings - Fork 543
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
Rename WaitBehavior enumeration values for clarity #7703
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
src/Aspire.Hosting/ApplicationModel/WaitAnnotation.cs:68
- The comment should be updated to reflect the new behavior accurately. Suggestion: 'Throw an exception if the resource enters a terminal state.'
/// Throw if the resource enters a terminal state.
src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:15
- The error message could be more descriptive. Consider updating it to: "The operation was cancelled before the resource '{resourceName}' met the predicate condition."
throw new OperationCanceledException("The operation was cancelled before the resource met the predicate condition.");
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I commented #7374 (comment) that "WaitBehavior.Throw" is a little oxymoronic, but this is used in WaitFor
and WaitAnnotation
, so no other name really makes sense for the enum.
This change is better than what we have. So LGTM.
/backport to release/9.1 |
Started backporting to release/9.1: https://github.com/dotnet/aspire/actions/runs/13449758642 |
@mitchdenny Is this PR still happening? What was the final outcome of bike shedding? |
No just closed it and the backport. But this one is going in: #7728 |
Once it merges to main I backport I had a build failure and Dan make a suggestion so just doing a build loop again. |
Update enumeration values to improve understanding of their intent, changing
WaitOnResourceUnavailable
toWait
andStopOnResourceUnavailable
toThrow
. Adjust related code to reflect these changes.