[Automated] Update API Surface Area - #17846
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17846Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17846" |
|
❓ CLI E2E Tests unknown — 110 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26838658119 |
fe197aa to
ac810bc
Compare
cfe8b79 to
346b8cc
Compare
fe5a901 to
84fffd3
Compare
84fffd3 to
b8f9bdf
Compare
e88df30 to
641f06c
Compare
641f06c to
08720bf
Compare
08720bf to
f6dcb52
Compare
943ee24 to
a7cfcd6
Compare
a7cfcd6 to
3ac7521
Compare
3ac7521 to
3cebb62
Compare
3cebb62 to
ab5dbdc
Compare
| [AspireExportIgnore(Reason = "Azure SDK-specific type not usable from polyglot hosts.")] | ||
| public System.Collections.Generic.IList<global::Azure.AI.Projects.Agents.ProtocolVersionRecord> ProtocolVersions { get { throw null; } init { } } | ||
|
|
||
| [AspireExportIgnore(Reason = "Azure SDK-specific type not usable from polyglot hosts.")] | ||
| public System.Collections.Generic.IList<global::Azure.AI.Projects.Agents.ProjectsAgentTool> Tools { get { throw null; } init { } } |
| [AspireValue("FoundryModels")] | ||
| public static readonly FoundryModel CohereCommandA; | ||
| [AspireValue("FoundryModels")] | ||
| public static readonly FoundryModel CohereCommandR082024; | ||
| [AspireValue("FoundryModels")] | ||
| public static readonly FoundryModel CohereCommandRPlus082024; | ||
| public static readonly FoundryModel CohereCommandAPlus052026; | ||
| [AspireValue("FoundryModels")] | ||
| public static readonly FoundryModel CohereEmbedV3English; | ||
| [AspireValue("FoundryModels")] |
| [AspireExport] | ||
| public required IResource Model { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| [AspireExport] | ||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| [System.Diagnostics.CodeAnalysis.Experimental("ASPIRECOMPUTE002", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| public sealed partial class KubernetesPersistentVolumeResource : ApplicationModel.Resource, ApplicationModel.IResourceWithParent<KubernetesEnvironmentResource>, ApplicationModel.IResourceWithParent, ApplicationModel.IResource | ||
| { | ||
| public KubernetesPersistentVolumeResource(string name, KubernetesEnvironmentResource environment) : base(default!) { } | ||
|
|
||
| public KubernetesEnvironmentResource Parent { get { throw null; } } | ||
| } |
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") | ||
| where T : Go.GoAppResource { throw null; } |
| [System.Obsolete("Use Services instead.")] | ||
| [AspireExportIgnore(Reason = "Obsolete alias for Services. The service provider is exposed to polyglot hosts via Services (services).")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| [AspireExportIgnore(Reason = "Uses Func<EndpointAnnotation, bool> which is not ATS-compatible. The ATS-friendly implementation is in src/Aspire.Hosting/Ats/CoreExports.cs and accepts endpoint names instead of a predicate.")] | ||
| public static ApplicationModel.IResourceBuilder<ApplicationModel.ProjectResource> WithEndpointsInEnvironment(this ApplicationModel.IResourceBuilder<ApplicationModel.ProjectResource> builder, System.Func<ApplicationModel.EndpointAnnotation, bool> filter) { throw null; } |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
src/Aspire.Hosting/api/Aspire.Hosting.cs:1
- The
Experimental(ASPIREINTERACTION001)annotation was removed fromIInteractionService(and many related interaction types) but is still applied to the newly addedPromptProgressAsync. If the broader interaction surface is still intended to be experimental, re-apply the attribute consistently (e.g., at the interface/type level or per-member) to preserve expected compiler diagnostics and avoid implying unintended API stability.
//------------------------------------------------------------------------------
| protected override void ClearItems() { } | ||
|
|
||
| protected override void InsertItem(int index, IResourceAnnotation item) { } | ||
|
|
||
| protected override void RemoveItem(int index) { } | ||
|
|
||
| protected override void SetItem(int index, IResourceAnnotation item) { } |
|
|
||
| [AspireExport] | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345) | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") |
| [System.Diagnostics.CodeAnalysis.Experimental("ASPIREINTERACTION001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| System.Threading.Tasks.Task<InteractionResult<bool>> PromptProgressAsync(string message, string? title = null, ProgressInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default); |
| public enum DevTunnelRegion : byte | ||
| { | ||
| WestEurope = 0, | ||
| UkSouth = 1, | ||
| NorthEurope = 2, | ||
| EastUs = 3, | ||
| EastUs2 = 4, | ||
| CentralIndia = 5, | ||
| WestUs3 = 6, | ||
| WestUs2 = 7, | ||
| SouthEastAsia = 8, | ||
| BrazilSouth = 9, | ||
| AustraliaCentral = 10, | ||
| AustraliaEast = 11, | ||
| JapanEast = 12 | ||
| } |
| [AspireExport] | ||
| public required IResource Model { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| [AspireExport] | ||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } } |
| public partial interface IInteractionService | ||
| { | ||
| bool IsAvailable { get; } |
| public sealed partial class InteractionFile | ||
| { | ||
| internal InteractionFile() { } | ||
|
|
||
| public string FilePath { get { throw null; } } |
| public enum DevTunnelRegion : byte | ||
| { | ||
| WestEurope = 0, |
| public static partial class RedisModules | ||
| { | ||
| [AspireValue("RedisModules")] | ||
| public const string BloomFilter = "/usr/local/lib/redis/modules/redisbloom.so"; |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
src/Aspire.Hosting/api/Aspire.Hosting.cs:1
- The
Experimental(\"ASPIREINTERACTION001\")marker appears to have been removed from theIInteractionServicetype (and many related interaction types) and is now applied only toPromptProgressAsync. This changes the API contract for the rest of the interaction surface; if the intent is that the interaction API remains experimental, re-apply theExperimentalattribute consistently at the appropriate type level (or apply it to all experimental members). If the intent is to make the rest stable, consider documenting that change explicitly and ensure all previously-experimental types were intentionally updated.
//------------------------------------------------------------------------------
src/Aspire.Hosting/api/Aspire.Hosting.cs:1
- The
AspireExportIgnoreonInputsDialogValidationContext.Serviceswas removed, but the property type is stillSystem.IServiceProvider. If this type is exported to ATS (the class is[AspireExport(ExposeProperties = true)]), exportingIServiceProvideris likely to be unsupported or to leak a .NET runtime abstraction into polyglot callers. Consider restoringAspireExportIgnoreonServices(or changing the exported surface to an ATS-friendly representation) to avoid breaking polyglot SDK generation/consumption.
//------------------------------------------------------------------------------
| [AspireExport] | ||
| public sealed partial class ContainerFileSystemCallbackContext | ||
| { | ||
| [System.Diagnostics.CodeAnalysis.Experimental("ASPIRECERTIFICATES001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| [AspireExportIgnore(Reason = "HttpsCertificateContext is an experimental certificate-specific type that is not yet part of the ATS surface.")] | ||
| public ContainerFileSystemCallbackHttpsCertificateContext? HttpsCertificateContext { get { throw null; } set { } } | ||
|
|
||
| [AspireExport] | ||
| public required IResource Model { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| [AspireExport] | ||
| public required System.IServiceProvider Services { get { throw null; } init { } } | ||
| } |
| public sealed partial class ResourceAnnotationCollection : System.Collections.ObjectModel.Collection<IResourceAnnotation> | ||
| { | ||
| protected override void ClearItems() { } | ||
|
|
||
| protected override void InsertItem(int index, IResourceAnnotation item) { } | ||
|
|
||
| protected override void RemoveItem(int index) { } | ||
|
|
||
| protected override void SetItem(int index, IResourceAnnotation item) { } | ||
| } |
| public sealed partial class HttpCommandRequestContext | ||
| { | ||
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| public sealed partial class HiddenAnnotation : IResourceAnnotation | ||
| { | ||
| public HiddenAnnotation(HiddenBehavior behavior) { } | ||
|
|
||
| public HiddenBehavior Behavior { get { throw null; } } | ||
|
|
||
| public System.Collections.Generic.List<int> SuccessfulExitCodes { get { throw null; } init { } } | ||
| } |
| System.Threading.Tasks.Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, System.Collections.Generic.IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default); | ||
| System.Threading.Tasks.Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default); | ||
| System.Threading.Tasks.Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default); | ||
| [System.Diagnostics.CodeAnalysis.Experimental("ASPIREINTERACTION001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| System.Threading.Tasks.Task<InteractionResult<bool>> PromptProgressAsync(string message, string? title = null, ProgressInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default); |
| public partial interface IInteractionService | ||
| { | ||
| bool IsAvailable { get; } |
| [System.Obsolete("Use Services instead.")] | ||
| [AspireExportIgnore(Reason = "Obsolete alias for Services. The service provider is exposed to polyglot hosts via Services (services).")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| protected override void ClearItems() { } | ||
|
|
||
| protected override void InsertItem(int index, IResourceAnnotation item) { } | ||
|
|
||
| protected override void RemoveItem(int index) { } | ||
|
|
||
| protected override void SetItem(int index, IResourceAnnotation item) { } |
|
|
||
| [AspireExport] | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345) | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") |
| [AspireExportIgnore(Reason = "Azure SDK-specific type not usable from polyglot hosts.")] | ||
| public System.Collections.Generic.IList<global::Azure.AI.Projects.Agents.ProtocolVersionRecord> ProtocolVersions { get { throw null; } init { } } |
| [AspireExportIgnore(Reason = "Password is typed as IValueProvider, which has no ATS-exported representation and no guaranteed concrete type to expose it as. The certificate paths (exposed as ReferenceExpression) cover the common configuration scenarios.")] | ||
| public required IValueProvider? Password { get { throw null; } init { } } |
| public required InteractionInputCollection Inputs { get { throw null; } init { } } | ||
|
|
||
| [AspireExportIgnore(Reason = "IServiceProvider is not part of the polyglot validation surface.")] | ||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| [System.Diagnostics.CodeAnalysis.Experimental("ASPIRECOMPUTE002", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| public sealed partial class KubernetesPersistentVolumeResource : ApplicationModel.Resource, ApplicationModel.IResourceWithParent<KubernetesEnvironmentResource>, ApplicationModel.IResourceWithParent, ApplicationModel.IResource | ||
| { | ||
| public KubernetesPersistentVolumeResource(string name, KubernetesEnvironmentResource environment) : base(default!) { } | ||
|
|
||
| public KubernetesEnvironmentResource Parent { get { throw null; } } | ||
| } |
| [System.Diagnostics.CodeAnalysis.Experimental("ASPIRECOMMAND001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| [AspireExportIgnore(Reason = "RequiredCommandValidationContext exposes IServiceProvider — not usable from polyglot hosts.")] | ||
| [AspireExport("withRequiredCommandValidation", MethodName = "withRequiredCommandValidation")] | ||
| public static ApplicationModel.IResourceBuilder<T> WithRequiredCommand<T>(this ApplicationModel.IResourceBuilder<T> builder, string command, System.Func<ApplicationModel.RequiredCommandValidationContext, System.Threading.Tasks.Task<ApplicationModel.RequiredCommandValidationResult>> validationCallback, string? helpLink = null) |
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") | ||
| where T : Go.GoAppResource { throw null; } |
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| protected override void ClearItems() { } | ||
|
|
||
| protected override void InsertItem(int index, IResourceAnnotation item) { } | ||
|
|
||
| protected override void RemoveItem(int index) { } | ||
|
|
||
| protected override void SetItem(int index, IResourceAnnotation item) { } |
|
|
||
| [AspireExport] | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345) | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") |
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") | ||
| where T : Go.GoAppResource { throw null; } |
| [AspireExportIgnore(Reason = "Azure SDK-specific type not usable from polyglot hosts.")] | ||
| public System.Collections.Generic.IList<global::Azure.AI.Projects.Agents.ProtocolVersionRecord> ProtocolVersions { get { throw null; } init { } } | ||
|
|
||
| [AspireExportIgnore(Reason = "Azure SDK-specific type not usable from polyglot hosts.")] | ||
| public System.Collections.Generic.IList<global::Azure.AI.Projects.Agents.ProjectsAgentTool> Tools { get { throw null; } init { } } |
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| public InteractionInputCollection Arguments { get { throw null; } init { } } | ||
|
|
||
| public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } } |
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } } | ||
|
|
||
| public System.IServiceProvider Services { get { throw null; } } |
| public static partial class RedisModules | ||
| { | ||
| [AspireValue("RedisModules")] | ||
| public const string BloomFilter = "/usr/local/lib/redis/modules/redisbloom.so"; | ||
| [AspireValue("RedisModules")] | ||
| public const string Json = "/usr/local/lib/redis/modules/rejson.so"; | ||
| [AspireValue("RedisModules")] | ||
| public const string Search = "/usr/local/lib/redis/modules/redisearch.so"; | ||
| [AspireValue("RedisModules")] | ||
| public const string TimeSeries = "/usr/local/lib/redis/modules/redistimeseries.so"; | ||
| } |
|
|
||
| [AspireExport] | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345) | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") |
| [AspireExport(ExposeProperties = true)] | ||
| public sealed partial class InputsDialogValidationContext | ||
| { |
| public required InteractionInputCollection Inputs { get { throw null; } init { } } | ||
|
|
||
| [AspireExportIgnore(Reason = "IServiceProvider is not part of the polyglot validation surface.")] | ||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| [System.Obsolete("Use Services instead.")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| [AspireExport] | ||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| public sealed partial class HiddenAnnotation : IResourceAnnotation | ||
| { |
| public System.Collections.Generic.List<int> SuccessfulExitCodes { get { throw null; } init { } } | ||
| } |
|
|
||
| public static ApplicationModel.ParameterResource CreateParameter(IDistributedApplicationBuilder builder, string name, bool secret) { throw null; } | ||
|
|
||
| [System.Obsolete("PublishAsConnectionString only works with the manifest publisher and is obsolete. Use AddConnectionString in publish-mode app model code instead.")] |
| [System.Obsolete("Use Services instead.")] | ||
| [AspireExportIgnore(Reason = "Obsolete alias for Services. The service provider is exposed to polyglot hosts via Services (services).")] | ||
| public System.IServiceProvider ServiceProvider { get { throw null; } init { } } | ||
|
|
||
| public required System.IServiceProvider Services { get { throw null; } init { } } |
| [AspireExport("withRequiredCommandValidation", MethodName = "withRequiredCommandValidation")] | ||
| public static ApplicationModel.IResourceBuilder<T> WithRequiredCommand<T>(this ApplicationModel.IResourceBuilder<T> builder, string command, System.Func<ApplicationModel.RequiredCommandValidationContext, System.Threading.Tasks.Task<ApplicationModel.RequiredCommandValidationResult>> validationCallback, string? helpLink = null) |
|
|
||
| [AspireExport] | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345) | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (6)
src/Aspire.Hosting/api/Aspire.Hosting.cs:633
- The
Experimental(\"ASPIREINTERACTION001\")marker appears to have been removed from theIInteractionServicetype and many related interaction types, but is still applied toPromptProgressAsync(and some new progress types). This creates inconsistent analyzer behavior where older interaction APIs may become implicitly non-experimental while new ones remain experimental. If the interaction surface is intended to remain experimental, re-apply the attribute at the interface/type level (or consistently on all relevant members); if it’s intended to be stable now, remove the experimental marker from the newly added progress APIs to match.
public partial interface IInteractionService
{
bool IsAvailable { get; }
src/Aspire.Hosting/api/Aspire.Hosting.cs:643
- The
Experimental(\"ASPIREINTERACTION001\")marker appears to have been removed from theIInteractionServicetype and many related interaction types, but is still applied toPromptProgressAsync(and some new progress types). This creates inconsistent analyzer behavior where older interaction APIs may become implicitly non-experimental while new ones remain experimental. If the interaction surface is intended to remain experimental, re-apply the attribute at the interface/type level (or consistently on all relevant members); if it’s intended to be stable now, remove the experimental marker from the newly added progress APIs to match.
[System.Diagnostics.CodeAnalysis.Experimental("ASPIREINTERACTION001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
System.Threading.Tasks.Task<InteractionResult<bool>> PromptProgressAsync(string message, string? title = null, ProgressInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
}
src/Aspire.Hosting/api/Aspire.Hosting.cs:157
- The
[AspireExportIgnore]reason states thatContainerFileSystemCallbackContexthas factory methods (createFile/createDirectory/createCertificateFile), but in this API file theContainerFileSystemCallbackContexttype (as shown later in the diff) only contains properties and no such factory methods. If those factory methods don’t exist on the public context type, the reason string should be updated to avoid referencing non-existent API; if they do exist, they should appear on the exported surface (or the reason should reference the correct type that provides them).
[AspireExportIgnore(Reason = "Exposed to ATS via the WithContainerFilesCallbackExport shim, which accepts integer file-mode options and lets polyglot callbacks build the IEnumerable<ContainerFileSystemItem> result through ContainerFileSystemCallbackContext factory methods (createFile/createDirectory/createCertificateFile).")]
public static ApplicationModel.IResourceBuilder<T> WithContainerFiles<T>(this ApplicationModel.IResourceBuilder<T> builder, string destinationPath, System.Func<ApplicationModel.ContainerFileSystemCallbackContext, System.Threading.CancellationToken, System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ApplicationModel.ContainerFileSystemItem>>> callback, int? defaultOwner = null, int? defaultGroup = null, System.IO.UnixFileMode? umask = null)
src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.cs:105
- The ignore reason on the convenience overload says 'polyglot hosts must pass protocol and version explicitly', but the overload that does accept
protocolandprotocolVersionis also marked[AspireExportIgnore]in this diff hunk. If polyglot hosts are expected to be able to specify protocol/version via an exported API, consider exporting an ATS-friendly overload (or adjusting the reason text to reflect the actual supported polyglot entry point, e.g., the exported DTO/dispatcher shape).
public static ApplicationModel.IResourceBuilder<T> AsHostedAgent<T>(this ApplicationModel.IResourceBuilder<T> builder, ApplicationModel.IResourceBuilder<Foundry.AzureCognitiveServicesProjectResource>? project, Foundry.HostedAgentProtocol protocol, string protocolVersion, System.Action<Foundry.HostedAgentConfiguration>? configure = null)
where T : ApplicationModel.IResourceWithEndpoints, ApplicationModel.IResourceWithEnvironment, ApplicationModel.IComputeResource { throw null; }
[AspireExportIgnore(Reason = "C# convenience overload; polyglot hosts must pass protocol and version explicitly.")]
public static ApplicationModel.IResourceBuilder<T> AsHostedAgent<T>(this ApplicationModel.IResourceBuilder<T> builder, ApplicationModel.IResourceBuilder<Foundry.AzureCognitiveServicesProjectResource>? project, System.Action<Foundry.HostedAgentConfiguration>? configure = null)
where T : ApplicationModel.IResourceWithEndpoints, ApplicationModel.IResourceWithEnvironment, ApplicationModel.IComputeResource { throw null; }
src/Aspire.Hosting/api/Aspire.Hosting.cs:688
- Introducing a public
FilePathonInteractionFilerisks unintentionally exposing server-local filesystem paths (e.g., in logs/telemetry or UI rendering), which can leak sensitive environment details. Consider avoiding the raw path in the public API (e.g., make it internal, or expose a safer identifier +OpenRead()/ReadAllBytesAsync()only), or at minimum explicitly document thatFilePathis server-local and should not be surfaced to untrusted clients.
public sealed partial class InteractionFile
{
internal InteractionFile() { }
public string FilePath { get { throw null; } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:694
- Introducing a public
FilePathonInteractionFilerisks unintentionally exposing server-local filesystem paths (e.g., in logs/telemetry or UI rendering), which can leak sensitive environment details. Consider avoiding the raw path in the public API (e.g., make it internal, or expose a safer identifier +OpenRead()/ReadAllBytesAsync()only), or at minimum explicitly document thatFilePathis server-local and should not be surfaced to untrusted clients.
public System.IO.Stream OpenRead() { throw null; }
|
|
||
| [AspireExport] | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345) | ||
| public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "") |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
src/Aspire.Hosting/api/Aspire.Hosting.cs:667
- With
AspireExport(ExposeProperties = true)onInputsDialogValidationContext, theServicesproperty will be part of the exported surface. Since it is typed asIServiceProvider(a runtime .NET type), this appears to reintroduce the exact ATS/polyglot incompatibility that the previously-presentAspireExportIgnorecomment indicated. Consider restoring[AspireExportIgnore]forServices(or replacing it with an ATS-safe abstraction) so the exported surface remains representable.
[AspireExport(ExposeProperties = true)]
public sealed partial class InputsDialogValidationContext
{
src/Aspire.Hosting/api/Aspire.Hosting.cs:672
- With
AspireExport(ExposeProperties = true)onInputsDialogValidationContext, theServicesproperty will be part of the exported surface. Since it is typed asIServiceProvider(a runtime .NET type), this appears to reintroduce the exact ATS/polyglot incompatibility that the previously-presentAspireExportIgnorecomment indicated. Consider restoring[AspireExportIgnore]forServices(or replacing it with an ATS-safe abstraction) so the exported surface remains representable.
public required System.IServiceProvider Services { get { throw null; } init { } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:1910
- Marking
ContainerBuildOptionsCallbackContextwithAspireExport(ExposeProperties = true)risks exporting members that are inherently .NET-runtime-specific (IResource,IServiceProvider,ILogger, etc.). This conflicts with the earlier rationale for ignoring similar APIs for ATS. A safer approach is to avoidExposeProperties = truehere and instead explicitly export only ATS-safe properties/methods (and/or addAspireExportIgnoreto runtime-typed members).
[System.Diagnostics.CodeAnalysis.Experimental("ASPIREPIPELINES003", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
[AspireExport(ExposeProperties = true)]
public sealed partial class ContainerBuildOptionsCallbackContext
{
public ContainerBuildOptionsCallbackContext(IResource resource, System.IServiceProvider services, Microsoft.Extensions.Logging.ILogger logger, System.Threading.CancellationToken cancellationToken, DistributedApplicationExecutionContext executionContext) { }
| protected override void ClearItems() { } | ||
|
|
||
| protected override void InsertItem(int index, IResourceAnnotation item) { } | ||
|
|
||
| protected override void RemoveItem(int index) { } | ||
|
|
||
| protected override void SetItem(int index, IResourceAnnotation item) { } |
| [AspireExportIgnore(Reason = "Azure SDK-specific type not usable from polyglot hosts.")] | ||
| public System.Collections.Generic.IList<global::Azure.AI.Projects.Agents.ProtocolVersionRecord> ProtocolVersions { get { throw null; } init { } } |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.
Suppressed comments (8)
src/Aspire.Hosting/api/Aspire.Hosting.cs:1
- These contexts now expose both
ServiceProvider(obsolete) andServicesbut the obsolete alias isn’t marked withAspireExportIgnore(unlikeExecuteCommandContext.ServiceProvider). If these contexts are part of the exported polyglot surface, this likely results in duplicated/ambiguous service-provider bindings. Recommend consistently applyingAspireExportIgnoreto the obsoleteServiceProvideraliases so polyglot consumers only seeServices.
//------------------------------------------------------------------------------
src/Aspire.Hosting/api/Aspire.Hosting.cs:2867
- These contexts now expose both
ServiceProvider(obsolete) andServicesbut the obsolete alias isn’t marked withAspireExportIgnore(unlikeExecuteCommandContext.ServiceProvider). If these contexts are part of the exported polyglot surface, this likely results in duplicated/ambiguous service-provider bindings. Recommend consistently applyingAspireExportIgnoreto the obsoleteServiceProvideraliases so polyglot consumers only seeServices.
[System.Obsolete("Use Services instead.")]
public System.IServiceProvider ServiceProvider { get { throw null; } init { } }
public required System.IServiceProvider Services { get { throw null; } init { } }
}
public sealed partial class HttpCommandResultContext
{
public InteractionInputCollection Arguments { get { throw null; } init { } }
public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } }
public required EndpointReference Endpoint { get { throw null; } init { } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:2004
- In an
[AspireExport]surface, keeping bothServiceProvider(obsolete) andServicesrisks exporting two equivalent service-provider properties to polyglot/ATS consumers, creating ambiguity and extra surface area. Consider addingAspireExportIgnoreto the obsoleteServiceProvideralias (while keeping it for C# source compatibility) soServicesis the single exported entry point.
[AspireExport]
public sealed partial class ContainerFileSystemCallbackContext
{
[System.Diagnostics.CodeAnalysis.Experimental("ASPIRECERTIFICATES001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
[AspireExportIgnore(Reason = "HttpsCertificateContext is an experimental certificate-specific type that is not yet part of the ATS surface.")]
public ContainerFileSystemCallbackHttpsCertificateContext? HttpsCertificateContext { get { throw null; } set { } }
[AspireExport]
public required IResource Model { get { throw null; } init { } }
[System.Obsolete("Use Services instead.")]
public System.IServiceProvider ServiceProvider { get { throw null; } init { } }
[AspireExport]
public required System.IServiceProvider Services { get { throw null; } init { } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:2877
- These contexts now expose both
ServiceProvider(obsolete) andServicesbut the obsolete alias isn’t marked withAspireExportIgnore(unlikeExecuteCommandContext.ServiceProvider). If these contexts are part of the exported polyglot surface, this likely results in duplicated/ambiguous service-provider bindings. Recommend consistently applyingAspireExportIgnoreto the obsoleteServiceProvideraliases so polyglot consumers only seeServices.
public required System.Net.Http.HttpResponseMessage Response { get { throw null; } init { } }
[System.Obsolete("Use Services instead.")]
public System.IServiceProvider ServiceProvider { get { throw null; } init { } }
public required System.IServiceProvider Services { get { throw null; } init { } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:3525
- As with other callback contexts, consider marking the obsolete
ServiceProvideralias withAspireExportIgnoreto avoid exporting bothserviceProviderandservicesto polyglot consumers. This keeps the polyglot contract smaller and reduces confusion while retaining C# compatibility via the obsolete property.
public InteractionInputCollection Arguments { get { throw null; } init { } }
public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:3539
- As with other callback contexts, consider marking the obsolete
ServiceProvideralias withAspireExportIgnoreto avoid exporting bothserviceProviderandservicesto polyglot consumers. This keeps the polyglot contract smaller and reduces confusion while retaining C# compatibility via the obsolete property.
public required string ResourceName { get { throw null; } init { } }
[System.Obsolete("Use Services instead.")]
public System.IServiceProvider ServiceProvider { get { throw null; } init { } }
public required System.IServiceProvider Services { get { throw null; } init { } }
src/Aspire.Hosting/api/Aspire.Hosting.cs:700
- Exposing a server-local
FilePathon a publicly returned interaction result object can unintentionally leak internal filesystem details (absolute paths, usernames, directory structure) to consumers and logs. If callers only need to read file contents, consider removingFilePathfrom the public surface (or making it non-sensitive, e.g., a display name), and rely onOpenRead()/ReadAllBytesAsync()for access.
public sealed partial class InteractionFile
{
internal InteractionFile() { }
public string FilePath { get { throw null; } }
public string Id { get { throw null; } }
public string Name { get { throw null; } }
public System.IO.Stream OpenRead() { throw null; }
src/Aspire.Hosting.Go/api/Aspire.Hosting.Go.cs:21
- The new optional
logOutput = \"\"default is ambiguous: an empty string can mean either “not specified” or “explicitly specify an empty log-output value”, and downstream command-line generation can end up emitting an invalid/undesired--log-output=. Consider changing this parameter tostring? logOutput = null(or moving these flags into an options DTO) so callers can omit the setting cleanly.
public static ApplicationModel.IResourceBuilder<T> WithDelveServer<T>(this ApplicationModel.IResourceBuilder<T> builder, int port = 2345, bool acceptMulticlient = true, bool? onlySameUser = null, bool continueOnStart = false, bool log = false, string logOutput = "")
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.