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

Rename WaitBehavior enumeration values for clarity #7703

Closed
wants to merge 4 commits into from

Conversation

mitchdenny
Copy link
Member

Update enumeration values to improve understanding of their intent, changing WaitOnResourceUnavailable to Wait and StopOnResourceUnavailable to Throw. Adjust related code to reflect these changes.

@Copilot Copilot bot review requested due to automatic review settings February 20, 2025 02:49
Copy link
Contributor

@Copilot Copilot AI left a 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.");

@mitchdenny mitchdenny added the area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing label Feb 20, 2025
@mitchdenny mitchdenny added this to the 9.1 milestone Feb 20, 2025
@danmoseley danmoseley added the Servicing-approved Approved for servicing release label Feb 20, 2025
Copy link
Member

@eerhardt eerhardt left a 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.

@danmoseley
Copy link
Member

/backport to release/9.1

Copy link
Contributor

Started backporting to release/9.1: https://github.com/dotnet/aspire/actions/runs/13449758642

@JamesNK
Copy link
Member

JamesNK commented Feb 21, 2025

@mitchdenny Is this PR still happening? What was the final outcome of bike shedding?

@mitchdenny mitchdenny closed this Feb 21, 2025
@mitchdenny
Copy link
Member Author

No just closed it and the backport. But this one is going in: #7728

@mitchdenny
Copy link
Member Author

Once it merges to main I backport I had a build failure and Dan make a suggestion so just doing a build loop again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants