Add polyglot exports for AppContainers#14758
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14758Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14758" |
There was a problem hiding this comment.
Pull request overview
This PR expands Aspire’s polyglot (ATS/TypeScript AppHost) support for Azure App Containers by adding new export coverage and improving ATS scanning/codegen so TypeScript AppHosts can use more of the integration surface.
Changes:
- Added ATS capability scanner support for assembly-level
[AspireExport(typeof(T))]and improved Unknown→Handle resolution for callback parameter/return types. - Fixed TypeScript codegen for multi-parameter callback argument destructuring typing.
- Added
[AspireExport]/[AspireExportIgnore]annotations across Azure App Containers APIs and introduced a TypeScript ValidationAppHost for the integration.
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting/Ats/AtsCapabilityScanner.cs | Adds assembly-level export scanning + resolves callback param/return types during Unknown-type resolution. |
| src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs | Fixes TS typing for multi-parameter callback destructuring. |
| src/Aspire.Hosting.Azure/AzureResourceInfrastructure.cs | Exports AzureResourceInfrastructure for polyglot callback contexts. |
| src/Aspire.Hosting.Azure.AppContainers/ContainerAppExtensions.cs | Adds export/ignore annotations and a polyglot-friendly scheduled job export overload. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppProjectExtensions.cs | Exports publishAsAzureContainerApp for projects. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs | Exports environment/naming/dashboard/HTTPS/log-analytics configuration APIs; ignores obsolete infra API. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExecutableExtensions.cs | Exports publishAsAzureContainerApp for executables. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppContainerExtensions.cs | Exports publishAsAzureContainerApp for containers. |
| src/Aspire.Hosting.Azure.AppContainers/AtsTypeMappings.cs | Adds assembly-level ATS export for external ContainerApp type. |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/* | Adds a new TypeScript ValidationAppHost for App Containers integration. |
| playground/polyglot/TypeScript/.../ValidationAppHost/.modules/* | Commits generated TypeScript SDK output (codegen artifacts). |
| .gitignore | Stops ignoring .modules/ under playground, increasing risk of committing generated SDK artifacts. |
Files not reviewed (1)
- playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/package-lock.json: Language not supported
.../polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/.modules/aspire.ts
Show resolved
Hide resolved
src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs
Show resolved
Hide resolved
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22589002542 |
d4c6f51 to
4ad1888
Compare
…ot-appcontainers # Conflicts: # tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go # tests/Aspire.Hosting.CodeGeneration.Java.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.java # tests/Aspire.Hosting.CodeGeneration.Python.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.py # tests/Aspire.Hosting.CodeGeneration.Rust.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.rs
Avoid generating/ registering CancellationToken as a handle wrapper in Go, Java, and Rust generators, and update snapshots. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| types = ex.Types.Where(t => t != null).ToArray()!; | ||
| } | ||
|
|
||
| // Process assembly-level [AspireExport(typeof(T))] attributes for cross-assembly type exports |
There was a problem hiding this comment.
Let's mark this down in the readme. We'll need to understand what it means when multiple assemblies do this.
|
@sebastienros see the feedback on the PR. |
Related to #14069