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

Add Api diff between 8.2.1 -> 9.0 RC1 #6295

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Oct 14, 2024

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

Comment on lines +406 to +418
## 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);
+ }
+ }
+}
Copy link
Member

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; }
Copy link
Member

@eerhardt eerhardt Oct 14, 2024

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.

Copy link
Member Author

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; }
Copy link
Member

@eerhardt eerhardt Oct 14, 2024

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)

Copy link
Member

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.

Copy link
Member

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

Copy link
Member

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.

Copy link
Member

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; }
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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);
Copy link
Member Author

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;
Copy link
Member Author

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.

Comment on lines +553 to +554
- 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);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change

Copy link

@abpiskunov abpiskunov Oct 23, 2024

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?

Comment on lines +560 to +565
- public Parameter PrincipalIdParameter { get; }
+ public ProvisioningParameter PrincipalIdParameter { get; }
- public Parameter PrincipalNameParameter { get; }
+ public ProvisioningParameter PrincipalNameParameter { get; }
- public Parameter PrincipalTypeParameter { get; }
+ public ProvisioningParameter PrincipalTypeParameter { get; }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking changes.

Comment on lines +438 to +447
- 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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking changes

Copy link
Member

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.

Copy link
Member Author

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 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change

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?

Copy link

@abpiskunov abpiskunov Oct 23, 2024

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; }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change

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?

docs/api-diffs/9.0/rc.1/diff.md Show resolved Hide resolved
docs/api-diffs/9.0/rc.1/diff.md Show resolved Hide resolved
docs/api-diffs/9.0/rc.1/diff.md Show resolved Hide resolved
docs/api-diffs/9.0/rc.1/diff.md Show resolved Hide resolved
docs/api-diffs/9.0/rc.1/diff.md Show resolved Hide resolved
docs/api-diffs/9.0/rc.1/diff.md Show resolved Hide resolved
@JamesNK JamesNK mentioned this pull request Oct 15, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants