Skip to content

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 AI review requested due to automatic review settings February 20, 2025 02:49
Copy link
Contributor

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

@github-actions
Copy link
Contributor

@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.

@mitchdenny mitchdenny deleted the mitchdenny/wait-behavior-enum-names branch March 5, 2025 03:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

5 participants