Skip to content

Add polyglot exports for AppContainers#14758

Merged
davidfowl merged 6 commits intorelease/13.2from
sebros/polyglot-appcontainers
Mar 3, 2026
Merged

Add polyglot exports for AppContainers#14758
davidfowl merged 6 commits intorelease/13.2from
sebros/polyglot-appcontainers

Conversation

@sebastienros
Copy link
Member

Related to #14069

Copilot AI review requested due to automatic review settings February 27, 2026 00:51
@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14758

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14758"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 8f4cfbd:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22589002542

…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
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 mark this down in the readme. We'll need to understand what it means when multiple assemblies do this.

@davidfowl davidfowl merged commit cae16ca into release/13.2 Mar 3, 2026
346 checks passed
@davidfowl davidfowl deleted the sebros/polyglot-appcontainers branch March 3, 2026 06:32
@davidfowl
Copy link
Member

@sebastienros see the feedback on the PR.

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.

3 participants