Skip to content

Add ATS pipeline parity for polyglot AppHosts#15826

Merged
sebastienros merged 11 commits intomainfrom
sebros/ts-builder-pipeline-parity
Apr 13, 2026
Merged

Add ATS pipeline parity for polyglot AppHosts#15826
sebastienros merged 11 commits intomainfrom
sebros/ts-builder-pipeline-parity

Conversation

@sebastienros
Copy link
Copy Markdown
Contributor

Description

Fixes #15708 by exposing the builder pipeline through standard ATS exports instead of TypeScript-only generator special casing. This keeps the polyglot AppHost surface aligned across TypeScript, Python, and Java while preserving the existing C# pipeline API.

This change exports IDistributedApplicationPipeline, adds ATS-friendly addStep and configure methods on the pipeline handle, and updates the TypeScript generator snapshot plus the TypeScript, Python, and Java polyglot fixtures to use the shared generated shape. It also explicitly hides the internal manifest publishing pipeline extension from the polyglot surface. During self-review, I fixed a shared TypeScript callback-generation bug in the multi-parameter CancellationToken path.

Dependencies required for this change: none.

Fixes #15708

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 2, 2026 23:24
@sebastienros sebastienros requested a review from davidfowl as a code owner April 2, 2026 23:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15826

Or

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

Copy link
Copy Markdown
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 addresses #15708 by exposing the distributed application builder pipeline to polyglot AppHosts via standard ATS exports (rather than TypeScript-only generator special-casing), and updates the generated TypeScript surface plus polyglot fixtures to use the shared shape.

Changes:

  • Export IDistributedApplicationPipeline through ATS and add ATS-friendly addStep and configure capability exports.
  • Update the TypeScript ATS code generator and snapshot to include the builder-level pipeline handle and its methods.
  • Update TypeScript/Python/Java polyglot AppHost fixtures to exercise the builder-level pipeline API; hide an internal manifest publishing pipeline extension from the polyglot surface.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.ts Uses the generated builder-level pipeline handle (builder.pipeline.get()) and exercises addStep/configure.
tests/PolyglotAppHosts/Aspire.Hosting/Python/apphost.py Uses the generated builder-level pipeline API (builder.pipeline) and exercises add_step/configure.
tests/PolyglotAppHosts/Aspire.Hosting/Java/AppHost.java Uses the generated builder-level pipeline API (builder.pipeline()) and exercises addStep/configure.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts Updates the verified generated TypeScript API surface to include pipeline handle/methods.
src/Aspire.Hosting/Publishing/ManifestPublishingExtensions.cs Explicitly hides internal manifest publishing pipeline extension from ATS/polyglot export surface.
src/Aspire.Hosting/Ats/PipelineExports.cs Adds ATS capability exports for pipeline addStep and configure.
src/Aspire.Hosting/Ats/AtsTypeMappings.cs Adds assembly-level ATS type export for IDistributedApplicationPipeline.
src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs Adjusts method/interface generation and callback codegen (including indentation handling).

Comment thread src/Aspire.Hosting/Ats/PipelineExports.cs Outdated
sebastienros and others added 2 commits April 2, 2026 16:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.ts
sebastienros and others added 3 commits April 3, 2026 18:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sebastienros sebastienros requested a review from eerhardt as a code owner April 4, 2026 01:51
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread src/Aspire.Hosting/Ats/PipelineExports.cs
Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

Looks good — clean approach to exporting the pipeline surface through standard ATS exports. Two minor nits on pre-existing patterns in generated snapshots (Rust unused bindings, Go/Java nil guard on required callback). No blocking issues.

davidfowl and others added 4 commits April 10, 2026 23:46
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sebastienros sebastienros merged commit 659f908 into main Apr 13, 2026
279 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 68 recordings uploaded (commit cbf92f9)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AllPublishMethodsBuildDockerImages ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ View Recording
DeployK8sWithGarnet ▶️ View Recording
DeployK8sWithMongoDB ▶️ View Recording
DeployK8sWithMySql ▶️ View Recording
DeployK8sWithPostgres ▶️ View Recording
DeployK8sWithRabbitMQ ▶️ View Recording
DeployK8sWithRedis ▶️ View Recording
DeployK8sWithSqlServer ▶️ View Recording
DeployK8sWithValkey ▶️ View Recording
DeployTypeScriptAppToKubernetes ▶️ 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
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #24350785976

@sebastienros sebastienros deleted the sebros/ts-builder-pipeline-parity branch April 13, 2026 15:47
@joperezr joperezr added this to the 13.3 milestone Apr 14, 2026
radical pushed a commit that referenced this pull request Apr 14, 2026
* Add ATS pipeline parity for polyglot AppHosts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix polyglot codegen snapshot EOFs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Simplify callback close generation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix redundant ATS export IDs after mainline sync

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove redundant AppContainers export ID

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Sync latest main and harden StartStop E2E

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Harden remaining StartStop E2E waits

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: David Fowler <davidfowl@gmail.com>
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.

TypeScript AppHost: Add builder.pipeline API (AddStep, Configure, WellKnownPipelineSteps)

5 participants