-
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
[Automated] Update API Surface Area #7374
base: main
Are you sure you want to change the base?
Conversation
FYI: @davidfowl @eerhardt |
src/Aspire.Hosting.Azure.EventHubs/api/Aspire.Hosting.Azure.EventHubs.cs
Outdated
Show resolved
Hide resolved
02609f0
to
677fdfe
Compare
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 7 out of 22 changed files in this pull request and generated no comments.
Files not reviewed (15)
- src/Components/Aspire.Azure.AI.OpenAI/api/Aspire.Azure.AI.OpenAI.cs: Evaluated as low risk
- src/Components/Aspire.MongoDB.Driver.v3/api/Aspire.MongoDB.Driver.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.EventHubs/api/Aspire.Hosting.Azure.EventHubs.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.PostgreSQL/api/Aspire.Hosting.Azure.PostgreSQL.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.Redis/api/Aspire.Hosting.Azure.Redis.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.ServiceBus/api/Aspire.Hosting.Azure.ServiceBus.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.SignalR/api/Aspire.Hosting.Azure.SignalR.cs: Evaluated as low risk
- src/Components/Aspire.NATS.Net/api/Aspire.NATS.Net.cs: Evaluated as low risk
- src/Components/Aspire.OpenAI/api/Aspire.OpenAI.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.CosmosDB/api/Aspire.Hosting.Azure.CosmosDB.cs: Evaluated as low risk
- src/Components/Aspire.Confluent.Kafka/api/Aspire.Confluent.Kafka.cs: Evaluated as low risk
- src/Aspire.Hosting.Azure.AppContainers/api/Aspire.Hosting.Azure.AppContainers.cs: Evaluated as low risk
- src/Aspire.Hosting/api/Aspire.Hosting.cs: Evaluated as low risk
- src/Aspire.Hosting.Keycloak/api/Aspire.Hosting.Keycloak.cs: Evaluated as low risk
- src/Aspire.Hosting.Redis/api/Aspire.Hosting.Redis.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/Aspire.Hosting.Nats/api/Aspire.Hosting.Nats.cs:32
- The
userName
andpassword
parameters are optional but are not being checked for null values when being set in theNatsServerResource
constructor. This could lead to potential null reference exceptions if these parameters are accessed without null checks elsewhere in the code. Consider adding null checks or handling these parameters appropriately.
public NatsServerResource(string name, ParameterResource? userName, ParameterResource? password) : base(default!, default) { }
f206793
to
7fa712f
Compare
aaa45ff
to
483f443
Compare
483f443
to
aac97bd
Compare
public enum WaitBehavior | ||
{ | ||
WaitOnDependencyFailure = 0, | ||
StopOnDependencyFailure = 1 | ||
} |
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.
@JamesNK You had thoughts on these names right?
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.
It isn't clear to me if StopOnDependencyFailure
means:
- it will stop waiting if a dependency it's waiting on fails to start
- whether it throws an exception if the stop condition is hit
- it will stop the resource if the dependency fails after everything is started
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.
FailOnDependencyFailure
StopOnDependencyTerminal
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'd assume the behaviors we want to be able to select are:
- Keep waiting forever until the dependency has started
- Cancel waiting and throw an exception if the dependency fails to start
Do we think there's a need for being able to stop waiting and just start anyway if a dependency fails to start?
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.
Unclear if that last one is needed but it could be an option we add later.
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.
That's not bad.
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.
@mitchdenny can this thread be resolved?
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.
The new names are:
public enum WaitBehavior
{
/// <summary>
/// If the resource is unavailable, continue waiting.
/// </summary>
WaitOnResourceUnavailable,
/// <summary>
/// If the resource is unavailable, stop waiting.
/// </summary>
StopOnResourceUnavailable
}
Which is different than @ReubenBond's suggestion above. Do we have an official consensus on what names we want here?
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 adopted the names from a branch that David had. In terms of enumeration name, I think WaitBehavior
is fine. I do like Wait
and Throw
as enumeration values and am happy to make that change.
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'm probably bikeshedding at this point (but hey, it's API review), but WaitBehavior.Wait
and WaitBehavior.Throw
kinda doesn't make sense. If it is WaitBehavior
and the behavior is Throw
, that isn't really "waiting".
a34cb16
to
607c309
Compare
34dcaf9
to
d4a07e3
Compare
src/Aspire.Hosting.Azure.CosmosDB/api/Aspire.Hosting.Azure.CosmosDB.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.SignalR/api/Aspire.Hosting.Azure.SignalR.cs
Outdated
Show resolved
Hide resolved
e980bc9
to
7117075
Compare
…Config Reaction to #7374 (comment).
…Config (#7667) Reaction to #7374 (comment).
…Config Reaction to #7374 (comment).
…Config (#7675) Reaction to #7374 (comment). Co-authored-by: Safia Abdalla <[email protected]>
src/Aspire.Hosting.Azure.CosmosDB/api/Aspire.Hosting.Azure.CosmosDB.cs
Outdated
Show resolved
Hide resolved
7117075
to
42e86c9
Compare
42e86c9
to
6f09a08
Compare
@@ -147,6 +153,12 @@ public ApplicationModel.IResourceBuilder<T> CreateResourceBuilder<T>(T resource) | |||
where T : ApplicationModel.IResource { throw null; } | |||
} | |||
|
|||
public static partial class DistributedApplicationBuilderExtensions | |||
{ | |||
public static ApplicationModel.IResourceBuilder<T> CreateResourceBuilder<T>(this IDistributedApplicationBuilder builder, string name) |
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 there was a little bit of discussion in #3022 (comment), but I kind of think Get
makes more sense here. Yes it "creates a resource builder", but builders are ephemeral. I think it is a bit confusing to call this "Create" when logically you are just getting a builder wrapped around the existing resource.
Thoughts @davidfowl @mitchdenny @ReubenBond @DamianEdwards ?
Why am I receiving this? Please remove me.
Thanks
From: Eric Erhardt ***@***.***>
Sent: Thursday, February 20, 2025 8:54 PM
To: dotnet/aspire ***@***.***>
Cc: Eerhard van Vliet ***@***.***>; Mention ***@***.***>
Subject: Re: [dotnet/aspire] [Automated] Update API Surface Area (PR #7374)
CAUTION: External email. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@eerhardt commented on this pull request.
________________________________
In src/Aspire.Hosting/api/Aspire.Hosting.cs<https://urldefense.com/v3/__https:/github.com/dotnet/aspire/pull/7374*discussion_r1964248045__;Iw!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQvzP0Bc06$>:
@@ -147,6 +153,12 @@ public ApplicationModel.IResourceBuilder<T> CreateResourceBuilder<T>(T resource)
where T : ApplicationModel.IResource { throw null; }
}
+ public static partial class DistributedApplicationBuilderExtensions
+ {
+ public static ApplicationModel.IResourceBuilder<T> CreateResourceBuilder<T>(this IDistributedApplicationBuilder builder, string name)
I know there was a little bit of discussion in #3022 (comment)<https://urldefense.com/v3/__https:/github.com/dotnet/aspire/issues/3022*issuecomment-2628438596__;Iw!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQv6xhi6vr$>, but I kind of think Get makes more sense here. Yes it "creates a resource builder", but builders are ephemeral. I think it is a bit confusing to call this "Create" when logically you are just getting a builder wrapped around the existing resource.
Thoughts @davidfowl<https://urldefense.com/v3/__https:/github.com/davidfowl__;!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQv_GZWKHj$> @mitchdenny<https://urldefense.com/v3/__https:/github.com/mitchdenny__;!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQv699B7oU$> @ReubenBond<https://urldefense.com/v3/__https:/github.com/ReubenBond__;!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQv1-umgdB$> @DamianEdwards<https://urldefense.com/v3/__https:/github.com/DamianEdwards__;!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQv_1nGCV-$> ?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/dotnet/aspire/pull/7374*pullrequestreview-2630990394__;Iw!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQvwEQFQ4G$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A6RVCX7BACQ3JDCPM7DGTMT2QYXEPAVCNFSM6AAAAABWKWI6HOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZQHE4TAMZZGQ__;!!ES59v9q643DO!fAsd5S99qZTyZqp9toHyhOkO51OzII8zc4benv0UtwkMgtp5oij3yIorFcOyveXBoMyaXaxGyota8lL3LhqPMLCjUuwQv14Z_owe$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
This communication and any information or attachments it contains is confidential and is intended solely for its designated recipient(s). If you received this email in error or are otherwise not the intended recipient, you are requested to notify the sender and permanently delete this message along with any attachments and copies immediately. The dissemination, copying or use of the contents of this communication by or to anyone other than its designated and intended recipient(s) is strictly prohibited and may be unlawful. More information can be found at https://www.cscglobal.com/service/csc/legal.
For information about how we use your personal data, including your rights, please see our Privacy Notice and Data Processing Protocol at cscglobal.com/service/csc/privacy.
|
Auto-generated update to the API surface to compare current surface vs latest release. This should only be merged once this surface area ships in a new release.