-
Notifications
You must be signed in to change notification settings - Fork 452
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
Add Api diff between 8.2.1 -> 9.0 RC1 #6295
base: main
Are you sure you want to change the base?
Conversation
## Aspire.Hosting.Analyzers | ||
|
||
``` diff | ||
{ | ||
+ namespace Aspire.Hosting.Analyzers { | ||
+ [DiagnosticAnalyzerAttribute("C#", new string[]{ })] | ||
+ public class AppHostAnalyzer : DiagnosticAnalyzer { | ||
+ public AppHostAnalyzer(); | ||
+ public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } | ||
+ public override void Initialize(AnalysisContext context); | ||
+ } | ||
+ } | ||
+} |
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.
Can we filter this out? This is not real API - it is a tooling (analyzer) assembly.
+ public OpenAISettings(); | ||
+ public bool DisableMetrics { get; set; } | ||
+ public bool DisableTracing { get; set; } | ||
+ public Uri Endpoint { get; set; } |
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.
This is
public Uri? Endpoint { get; set; }
in the code. Is there a reason this doesn't have ?
on it?
Same for Key
.
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.
likely a bug in asmdiff.
+ public IServiceProvider Services { get; } | ||
+ } | ||
public class ConnectionStringReference : IManifestExpressionProvider, IValueProvider, IValueWithReferences { | ||
+ public string? ConnectionName { get; set; } |
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.
@captainsafia - I'm not seeing this property used anywhere. Can it be removed?
It was added in Add AzureFunctionsEndToEnd with prototype implementation (dotnet/aspire#5418)
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 added it, I think we should keep it. It properly captures all of the information from the call. It was missing before.
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.
Might be good to have a unit test for it...
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.
Yes, I believe we can remove it. This property predates our proposal to use IAzureFunctionsResourceConfig
to inject environment variables into the Functions process. I can open a PR to remove it.
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 added it, I think we should keep it. It properly captures all of the information from the call. It was missing before.
Looks like I hit send on my message before seeing yours. What do you mean by “properly capture all of the information from the call”?
+ public static IResourceBuilder<T> WithLifetime<T>(this IResourceBuilder<T> builder, ContainerLifetime lifetime) where T : ContainerResource; | ||
} | ||
public class DistributedApplicationBuilder : IDistributedApplicationBuilder { | ||
+ public string AppHostPath { get; } |
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.
@davidfowl @danegsta - Was this new public property necessary? I see we didn't add it on the interface, was that intentional?
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.
Honestly, looking at the original PR again, this property is probably superfluous, since we ended up generating the project hash in the DistributedApplicationBuilder constructor and exposing it as an in memory configuration property.
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.
Let's remove it.
+ } | ||
public class ResourceNotificationService { | ||
- [ObsoleteAttribute("ResourceNotificationService now requires an IHostApplicationLifetime.\r\nUse the constructor that accepts an ILogger<ResourceNotificationService> and IHostApplicationLifetime.\r\nThis constructor will be removed in the next major version of Aspire.")] | ||
- public ResourceNotificationService(ILogger<ResourceNotificationService> logger); |
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 this was obsoleted already, but we should make sure this is called out in the breaking changes notes anyway. cc: @mitchdenny
- public interface IDistributedApplicationEvent | ||
+ public interface IDistributedApplicationEvent | ||
public interface IDistributedApplicationEventing { | ||
+ Task PublishAsync<T>(T @event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken = default(CancellationToken)) where T : IDistributedApplicationEvent; |
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.
This is a breaking change. While this was experimental, we may need to call this out in our release notes.
- public static void AssignProperty<T>(this Resource<T> resource, Expression<Func<T, object?>> propertySelector, IResourceBuilder<ParameterResource> parameterResourceBuilder, string? parameterName = null); | ||
- public static void AssignProperty<T>(this Resource<T> resource, Expression<Func<T, object?>> propertySelector, BicepOutputReference outputReference, string? parameterName = null); |
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.
Breaking 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.
With what API to replace those? I assume with this ones AsProvisioningParameter? Are there examples?
- public Parameter PrincipalIdParameter { get; } | ||
+ public ProvisioningParameter PrincipalIdParameter { get; } | ||
- public Parameter PrincipalNameParameter { get; } | ||
+ public ProvisioningParameter PrincipalNameParameter { get; } | ||
- public Parameter PrincipalTypeParameter { get; } | ||
+ public ProvisioningParameter PrincipalTypeParameter { get; } |
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.
Breaking changes.
- public static IResourceBuilder<ICloudFormationStackResource> AddAWSCloudFormationStack(this IDistributedApplicationBuilder builder, string stackName); | ||
+ public static IResourceBuilder<ICloudFormationStackResource> AddAWSCloudFormationStack(this IDistributedApplicationBuilder builder, [ResourceNameAttribute] string name, string? stackName = null); | ||
- public static IResourceBuilder<ICloudFormationTemplateResource> AddAWSCloudFormationTemplate(this IDistributedApplicationBuilder builder, string stackName, string templatePath); | ||
+ public static IResourceBuilder<ICloudFormationTemplateResource> AddAWSCloudFormationTemplate(this IDistributedApplicationBuilder builder, [ResourceNameAttribute] string name, string templatePath, string? stackName = null); | ||
- public static IResourceBuilder<ICloudFormationStackResource> WithReference(this IResourceBuilder<ICloudFormationStackResource> builder, IAmazonCloudFormation cloudFormationClient); | ||
- public static IResourceBuilder<ICloudFormationStackResource> WithReference(this IResourceBuilder<ICloudFormationStackResource> builder, IAWSSDKConfig awsSdkConfig); | ||
- public static IResourceBuilder<ICloudFormationTemplateResource> WithReference(this IResourceBuilder<ICloudFormationTemplateResource> builder, IAmazonCloudFormation cloudFormationClient); | ||
- public static IResourceBuilder<ICloudFormationTemplateResource> WithReference(this IResourceBuilder<ICloudFormationTemplateResource> builder, IAWSSDKConfig awsSdkConfig); | ||
+ public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IAmazonCloudFormation cloudFormationClient) where TDestination : ICloudFormationResource; | ||
- public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<ICloudFormationResource> cloudFormationResourceBuilder, string configSection = "AWS::Resources") where TDestination : IResourceWithEnvironment; |
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.
Breaking changes
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.
AWS was not "stable" before this release.
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.
Yup, I think all the breaking changes I found (or most) were not stable APIs. Just flagging the ones that are breaking in case we decide to include in the release notes for existing customers (not saying we have to given they were experimental)
+ } | ||
} | ||
namespace Aspire.Hosting.AWS { | ||
- public class AWSProvisioningException : Exception { |
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.
breaking 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.
With what exception to replace this one?
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 see it was moved to a new namespace:
namespace Aspire.Hosting.AWS.Provisioning {
+ public class AWSProvisioningException : Exception {
+ public AWSProvisioningException(string message, Exception? innerException = null);
+ }
+ }
+ public interface ICloudFormationResource : IAWSResource, IResource { | ||
- IAWSSDKConfig AWSSDKConfig { get; set; } | ||
- TaskCompletionSource ProvisioningTaskCompletionSource { get; set; } | ||
+ string StackName { get; } |
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.
Breaking 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.
what is the replacement for removed API or suggestion?
This is adding a markdown file that has the API Diff between 8.2.1 and 9.0-rc1 release.
@davidfowl @DamianEdwards @eerhardt @mitchdenny @JamesNK PTAL and make sure everything here is expected. Also, please tag anyone that is relevant for areas as you see appropriate.
Microsoft Reviewers: Open in CodeFlow