Export more importable ATS hosting APIs#15557
Export more importable ATS hosting APIs#15557sebastienros wants to merge 12 commits intorelease/13.2from
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15557Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15557" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/apphost.ts
Outdated
Show resolved
Hide resolved
playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/apphost.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Expands the importable ATS/polyglot export surface across Aspire.Hosting, Aspire.Hosting.Azure, and Aspire.Hosting.Foundry, and updates the TypeScript polyglot validation apphosts + checked-in generated SDK outputs to compile against the new exports (including moving validation apphosts to aspire.config.json).
Changes:
- Adds union/DTO-based ATS-safe dispatcher exports (e.g.,
addContainer,withBuildArg,withConnectionProperty,withReferenceEnvironment) and new ATS DTOs. - Exports additional Azure/Foundry resource APIs to polyglot (including “existing resource” helpers and more resource/property exports).
- Regenerates TypeScript validation apphosts’
.modulesoutput and updates snapshots to reflect the new capability surface.
Reviewed changes
Copilot reviewed 81 out of 90 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/HostingContainerResourceCapabilities.verified.txt | Updates TS codegen snapshot for newly exported/renamed capabilities (e.g., withBuildArg, withRelationship, withContainerCertificatePaths, withReferenceEnvironment). |
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/HostingAddContainerCapability.verified.txt | Updates snapshot for the polyglot addContainer union parameter and new source location. |
| src/Aspire.Hosting/ResourceBuilderExtensions.cs | Adds ATS dispatcher exports for withConnectionProperty (union) and withReferenceEnvironment (DTO), and adds an exported withRelationship overload that accepts a resource builder. |
| src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs | Exports AddProject(builder,name,projectPath) as addProjectWithoutLaunchProfile for polyglot. |
| src/Aspire.Hosting/ParameterResourceBuilderExtensions.cs | Adds/export an ATS-safe overload for generated parameter defaults (GenerateParameterDefault). |
| src/Aspire.Hosting/ContainerResourceBuilderExtensions.cs | Adds polyglot addContainer union overload and ATS dispatcher exports for withBuildArg and withContainerCertificatePaths. |
| src/Aspire.Hosting/Ats/ReferenceEnvironmentInjectionOptions.cs | New ATS DTO for mapping environment injection options to flags. |
| src/Aspire.Hosting/Ats/AddContainerOptions.cs | New ATS DTO for addContainer image configuration. |
| src/Aspire.Hosting/ApplicationModel/ParameterDefault.cs | Marks GenerateParameterDefault as an ATS DTO. |
| src/Aspire.Hosting.Foundry/Project/ProjectBuilderExtension.cs | Adds exported polyglot shims for Foundry capability hosts and consolidates config creation/retrieval helpers. |
| src/Aspire.Hosting.Foundry/FoundryResource.cs | Marks FoundryResource as exported. |
| src/Aspire.Hosting.Foundry/FoundryDeploymentResource.cs | Makes Parent available to polyglot by removing ignore metadata. |
| src/Aspire.Hosting.Azure/ExistingAzureResourceExtensions.cs | Reworks “existing resource” helpers into union-based polyglot exports and shared core implementations. |
| src/Aspire.Hosting.Azure.Sql/AzureSqlServerResource.cs | Removes polyglot ignore annotations from additional output references and database dictionary exposure. |
| src/Aspire.Hosting.Azure.Sql/AzureSqlExtensions.cs | Exports WithAdminDeploymentScriptSubnet to polyglot. |
| src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusTopicResource.cs | Makes Parent and ConnectionStringExpression available to polyglot. |
| src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusSubscriptionResource.cs | Makes Parent and ConnectionStringExpression available to polyglot. |
| src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusResource.cs | Marks AzureServiceBusResource as exported. |
| src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusQueueResource.cs | Makes Parent and ConnectionStringExpression available to polyglot. |
| src/Aspire.Hosting.Azure.Redis/AzureManagedRedisResource.cs | Makes NameOutputReference and Id available to polyglot. |
| src/Aspire.Hosting.Azure.Network/AzureVirtualNetworkResource.cs | Marks AzureVirtualNetworkResource as exported. |
| src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs | Marks AzureSubnetResource as exported. |
| src/Aspire.Hosting.Azure.Kusto/AzureKustoHealthCheckBuilderExtensions.cs | Clarifies export-ignore reason text. |
| src/Aspire.Hosting.Azure.Kusto/AzureKustoClusterResource.cs | Makes additional output references available to polyglot. |
| src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs | Marks AzureEventHubsResource as exported. |
| src/Aspire.Hosting.Azure.EventHubs/AzureEventHubResource.cs | Makes Parent and ConnectionStringExpression available to polyglot. |
| src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs | Marks AzureOpenAIResource as exported. |
| src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeploymentResource.cs | Makes Parent and ConnectionStringExpression available to polyglot. |
| playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/aspire.config.json | Migrates validation apphost to aspire.config.json schema with appHost object. |
| playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/apphost.ts | Updates validation usage to new exports/unified methods (e.g., addContainer options, withConnectionProperty, withBuildArg, withReferenceEnvironment). |
| playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/.modules/base.ts | Regenerated TS base module (cancellation + transport serialization changes, toTransportValue support). |
| playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/.modules/transport.ts | Regenerated TS transport module (cancellation routing, circular ref detection, marshaling improvements, connection/auth flow). |
| playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Foundry/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Foundry validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Foundry/ValidationAppHost/apphost.ts | Updates Foundry validation to exercise new capability-host exports and additional parent/property getters. |
| playground/polyglot/TypeScript/Aspire.Hosting.Foundry/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Foundry validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Foundry/ValidationAppHost/.modules/transport.ts | Regenerated TS transport module for Foundry validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Foundry/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Foundry/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure validation apphost (incl. profiles). |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure/ValidationAppHost/apphost.ts | Updates “existing resource” calls to new unified overload shape. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure/ValidationAppHost/.modules/transport.ts | Regenerated TS transport module for Azure validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure.Sql validation apphost (incl. Azure.Network/Azure.Storage packages). |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/apphost.ts | Updates SQL validation to exercise newly exported subnet method + additional output refs/dictionaries. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure.Sql validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/transport.ts | Regenerated TS transport module for Azure.Sql validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure.ServiceBus validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/apphost.ts | Updates ServiceBus validation to exercise newly exported parent/connection-string expression getters. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure.ServiceBus validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure.Redis validation apphost (incl. KeyVault package). |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/apphost.ts | Updates Redis validation to exercise newly exported output refs/ids. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure.Redis validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Kusto/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure.Kusto validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Kusto/ValidationAppHost/apphost.ts | Updates Kusto validation to exercise newly exported output refs. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Kusto/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure.Kusto validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Kusto/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.Kusto/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure.EventHubs validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/apphost.ts | Updates EventHubs validation to exercise newly exported parent/connection-string expression getters. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure.EventHubs validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/aspire.config.json | Adds aspire.config.json for Azure.CognitiveServices validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/apphost.ts | Updates CognitiveServices validation to exercise newly exported deployment parent + connectionStringExpression. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/.modules/base.ts | Regenerated TS base module for Azure.CognitiveServices validation apphost. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/.modules/.codegen-hash | Updates generated hash. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/.aspire/settings.json | Removes legacy .aspire/settings.json. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| /// <param name="builder">The resource builder for the Microsoft Foundry project.</param> | ||
| /// <param name="openAI">The Microsoft Foundry resource builder.</param> | ||
| /// <returns>A reference to the project builder for chaining capability host configuration.</returns> | ||
| [AspireExportIgnore(Reason = "Use the polyglot withCapabilityHost overload instead.")] |
There was a problem hiding this comment.
Why do internal methods need AspireExportIgnore?
There was a problem hiding this comment.
You are right. This was first added (un-ignored) then refactored to another pattern which made this obsolete. Since it's new it should just be removed instead..
|
Re review 4007242739: declining this as an actionable comment because it is the review summary rather than a specific issue to address. I evaluated the concrete unresolved threads below and applied the warranted fixes there. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Reviewed the five comments called out in automation: 4007242739 is the Copilot review summary (informational only, so no code change); 2986149613/2988637945 were accepted and I pushed 1d18d71 to make the TypeScript DTO usage clearer in the validation apphost; 2988731875 and 2988731938 were already accepted earlier on the branch, and I verified both corresponding threads are already resolved with the fixes present in the current code. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
🎬 CLI E2E Test Recordings — 51 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23556540479 |
Description
Expand the importable ATS/polyglot export surface across
Aspire.Hosting,Aspire.Hosting.Azure, andAspire.Hosting.Foundry.[AspireExportIgnore]APIs into importable ATS exports, including union- and DTO-based shims for overloads and flags enumsaspire.config.jsonand remove the legacy.aspire/settings.jsonfilesChecklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: