Skip to content

Commit

Permalink
Adding workflow to automatically compare public API surface against p…
Browse files Browse the repository at this point in the history
…revious release
  • Loading branch information
Alirexaa committed Feb 28, 2025
1 parent 35e3911 commit 9406664
Show file tree
Hide file tree
Showing 41 changed files with 1,486 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/generate-api-diffs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Generate API Diffs

on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *' # 8am PST (16:00 UTC)

permissions:
contents: write
pull-requests: write

jobs:
generate-and-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Restore and build
run: ./eng/apicompat/generate-api-diffs.sh
continue-on-error: true

- name: Create or update pull request
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-api-diffs
base: main
title: "[Automated] Update API Surface Area"
body: "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."
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

<ItemGroup Label="Build Dependencies">
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.DotNet.GenAPI.Task" Version="9.0.103-servicing.25065.25" />
</ItemGroup>

<ItemGroup Label="Integration Packages">
Expand Down
3 changes: 3 additions & 0 deletions eng/apicompat/generate-api-diffs.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for /r src %%i in (*.csproj) do (
dotnet build "%%i" -f net8.0 --configuration Release --no-incremental /t:"Build;GenAPIGenerateReferenceAssemblySource"
)
3 changes: 3 additions & 0 deletions eng/apicompat/generate-api-diffs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
find src -type f -name "*.csproj" | while read -r csproj; do
dotnet build "$csproj" -f net8.0 --configuration Release --no-incremental -t:Build -t:GenAPIGenerateReferenceAssemblySource
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CommunityToolkit.Aspire.EventStore
{
public sealed partial class EventStoreSettings
{
public string? ConnectionString { get { throw null; } set { } }

public bool DisableHealthChecks { get { throw null; } set { } }

public bool DisableTracing { get { throw null; } set { } }

public System.TimeSpan? HealthCheckTimeout { get { throw null; } set { } }
}
}

namespace Microsoft.Extensions.Hosting
{
public static partial class AspireEventStoreExtensions
{
public static void AddEventStoreClient(this IHostApplicationBuilder builder, string connectionName, System.Action<CommunityToolkit.Aspire.EventStore.EventStoreSettings>? configureSettings = null) { }

public static void AddKeyedEventStoreClient(this IHostApplicationBuilder builder, string name, System.Action<CommunityToolkit.Aspire.EventStore.EventStoreSettings>? configureSettings = null) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CommunityToolkit.Aspire.GoFeatureFlag
{
public sealed partial class GoFeatureFlagClientSettings
{
public bool DisableHealthChecks { get { throw null; } set { } }

public System.Uri? Endpoint { get { throw null; } set { } }

public int? HealthCheckTimeout { get { throw null; } set { } }

public OpenFeature.Contrib.Providers.GOFeatureFlag.GoFeatureFlagProviderOptions ProviderOptions { get { throw null; } set { } }
}
}

namespace Microsoft.Extensions.Hosting
{
public static partial class AspireGoFeatureFlagExtensions
{
public static void AddGoFeatureFlagClient(this IHostApplicationBuilder builder, string connectionName, System.Action<CommunityToolkit.Aspire.GoFeatureFlag.GoFeatureFlagClientSettings>? configureSettings = null) { }

public static void AddKeyedGoFeatureFlagClient(this IHostApplicationBuilder builder, string name, System.Action<CommunityToolkit.Aspire.GoFeatureFlag.GoFeatureFlagClientSettings>? configureSettings = null) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aspire.Hosting
{
public static partial class ActiveMQBuilderExtensions
{
public static ApplicationModel.IResourceBuilder<ApplicationModel.ActiveMQServerResource> AddActiveMQ(this IDistributedApplicationBuilder builder, string name, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? userName = null, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? password = null, int? port = null, string scheme = "tcp", int? webPort = null) { throw null; }

public static ApplicationModel.IResourceBuilder<ApplicationModel.ActiveMQArtemisServerResource> AddActiveMQArtemis(this IDistributedApplicationBuilder builder, string name, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? userName = null, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? password = null, int? port = null, string scheme = "tcp", int? webPort = null) { throw null; }

public static ApplicationModel.IResourceBuilder<T> WithConfBindMount<T>(this ApplicationModel.IResourceBuilder<T> builder, string source, bool isReadOnly = false)
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }

public static ApplicationModel.IResourceBuilder<T> WithConfVolume<T>(this ApplicationModel.IResourceBuilder<T> builder, string? name = null, bool isReadOnly = false)
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }

public static ApplicationModel.IResourceBuilder<T> WithDataBindMount<T>(this ApplicationModel.IResourceBuilder<T> builder, string source, bool isReadOnly = false)
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }

public static ApplicationModel.IResourceBuilder<T> WithDataVolume<T>(this ApplicationModel.IResourceBuilder<T> builder, string? name = null, bool isReadOnly = false)
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }
}
}

namespace Aspire.Hosting.ApplicationModel
{
public partial class ActiveMQArtemisServerResource : ActiveMQServerResourceBase
{
public ActiveMQArtemisServerResource(string name, ParameterResource? userName, ParameterResource password, string scheme) : base(default!, default, default!, default!, default!) { }
}

public partial class ActiveMQServerResource : ActiveMQServerResourceBase
{
public ActiveMQServerResource(string name, ParameterResource? userName, ParameterResource password, string scheme) : base(default!, default, default!, default!, default!) { }
}

public abstract partial class ActiveMQServerResourceBase : ContainerResource, IResourceWithConnectionString, IResource, IManifestExpressionProvider, IValueProvider, IValueWithReferences, IResourceWithEnvironment
{
protected ActiveMQServerResourceBase(string name, ParameterResource? userName, ParameterResource password, string scheme, CommunityToolkit.Aspire.Hosting.ActiveMQ.IActiveMQSettings settings) : base(default!, default) { }

public CommunityToolkit.Aspire.Hosting.ActiveMQ.IActiveMQSettings ActiveMqSettings { get { throw null; } }

public ReferenceExpression ConnectionStringExpression { get { throw null; } }

public ParameterResource PasswordParameter { get { throw null; } }

public EndpointReference PrimaryEndpoint { get { throw null; } }

public ParameterResource? UserNameParameter { get { throw null; } }
}
}

namespace CommunityToolkit.Aspire.Hosting.ActiveMQ
{
public partial interface IActiveMQSettings
{
string ConfPath { get; }

string DataPath { get; }

string EnvironmentVariablePassword { get; }

string EnvironmentVariableUsername { get; }

string Image { get; }

string JolokiaPath { get; }

string Registry { get; }

string Tag { get; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aspire.Hosting
{
public static partial class DataApiBuilderHostingExtension
{
public static ApplicationModel.IResourceBuilder<ApplicationModel.DataApiBuilderContainerResource> AddDataAPIBuilder(this IDistributedApplicationBuilder builder, string name, int? httpPort = null, params string[] configFilePaths) { throw null; }

public static ApplicationModel.IResourceBuilder<ApplicationModel.DataApiBuilderContainerResource> AddDataAPIBuilder(this IDistributedApplicationBuilder builder, string name, params string[] configFilePaths) { throw null; }
}
}

namespace Aspire.Hosting.ApplicationModel
{
public partial class DataApiBuilderContainerResource : ContainerResource, IResourceWithServiceDiscovery, IResourceWithEndpoints, IResource
{
public DataApiBuilderContainerResource(string name, string? entrypoint = null) : base(default!, default) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aspire.Hosting
{
public static partial class SwaAppHostingExtension
{
public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> AddSwaEmulator(this IDistributedApplicationBuilder builder, string name, SwaResourceOptions options) { throw null; }

public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> AddSwaEmulator(this IDistributedApplicationBuilder builder, string name) { throw null; }

public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> WithApiResource(this ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> builder, ApplicationModel.IResourceBuilder<ApplicationModel.IResourceWithEndpoints> apiResource) { throw null; }

public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> WithAppResource(this ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> builder, ApplicationModel.IResourceBuilder<ApplicationModel.IResourceWithEndpoints> appResource) { throw null; }
}

public partial class SwaResourceOptions
{
public int DevServerTimeout { get { throw null; } set { } }

public int Port { get { throw null; } set { } }
}
}

namespace Aspire.Hosting.ApplicationModel
{
public partial class SwaApiEndpointAnnotation : IResourceAnnotation
{
public SwaApiEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) { }

public string Endpoint { get { throw null; } }
}

public partial class SwaAppEndpointAnnotation : IResourceAnnotation
{
public SwaAppEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) { }

public string Endpoint { get { throw null; } }
}

public partial class SwaResource : ExecutableResource
{
public SwaResource(string name, string workingDirectory) : base(default!, default!, default!) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Aspire.Hosting
{
public static partial class BunAppExtensions
{
public static ApplicationModel.IResourceBuilder<ApplicationModel.BunAppResource> AddBunApp(this IDistributedApplicationBuilder builder, string name, string? workingDirectory = null, string entryPoint = "index.ts", bool watch = false) { throw null; }

public static ApplicationModel.IResourceBuilder<ApplicationModel.BunAppResource> WithBunPackageInstallation(this ApplicationModel.IResourceBuilder<ApplicationModel.BunAppResource> resource) { throw null; }
}
}

namespace Aspire.Hosting.ApplicationModel
{
public partial class BunAppResource : ExecutableResource
{
public BunAppResource(string name, string workingDirectory) : base(default!, default!, default!) { }
}
}
Loading

0 comments on commit 9406664

Please sign in to comment.