Skip to content

Add polyglot exports for Aspire.Hosting.Yarp#14901

Merged
sebastienros merged 5 commits intorelease/13.2from
sebros/polyglot-yarp
Mar 4, 2026
Merged

Add polyglot exports for Aspire.Hosting.Yarp#14901
sebastienros merged 5 commits intorelease/13.2from
sebros/polyglot-yarp

Conversation

@sebastienros
Copy link
Contributor

Related to #14069

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 3, 2026 19:04
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

Adds polyglot (capability-based) exports for Aspire.Hosting.Yarp APIs and introduces a TypeScript validation AppHost project to exercise the generated polyglot surface.

Changes:

  • Annotates YARP hosting and transform extension methods with AspireExport for polyglot hosting.
  • Adds a TypeScript “ValidationAppHost” playground including generated .modules client/transport code and minimal apphost.ts.
  • Adds Node/TypeScript project configuration (package.json, tsconfig.json, Aspire settings) for running the playground.

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/Aspire.Hosting.Yarp/YarpResourceExtensions.cs Adds AspireExport attributes for YARP resource builder extension methods.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/ResponseTransformExtensions.cs Exports response transform extensions for polyglot hosts.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/RequestHeadersTransformExtensions.cs Exports request-header transform extensions for polyglot hosts.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/QueryTransformExtensions.cs Exports query transform extensions for polyglot hosts.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/PathTransformExtensions.cs Exports path transform extensions for polyglot hosts.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/HttpMethodTransformExtensions.cs Exports HTTP method transform extensions for polyglot hosts.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/ForwardedTransformExtensions.cs Exports forwarded/X-Forwarded-* transform extensions for polyglot hosts.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/tsconfig.json TS compiler configuration for the validation app host.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/package.json Node package metadata and scripts for the validation app host.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/apphost.ts Minimal TS app host that calls builder.addYarp('proxy').
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/apphost.run.json Local run profile configuration for the validation app host.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/transport.ts Generated JSON-RPC transport/client implementation for polyglot hosting.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/base.ts Generated core SDK primitives (handles, reference expressions, list/dict wrappers).
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/aspire.ts Generated capability-based TypeScript SDK surface for Aspire (+ YARP exports).
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/.codegen-hash Records codegen hash for the generated .modules output.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.aspire/settings.json Aspire polyglot settings for the validation project and package reference.
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/package-lock.json: Language not supported

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

github-actions bot commented Mar 3, 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 -- 14901

Or

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit f617162:

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 #22647431948

sebastienros and others added 3 commits March 3, 2026 15:10
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>
@sebastienros sebastienros requested a review from davidfowl March 3, 2026 23:30
@sebastienros sebastienros enabled auto-merge (squash) March 4, 2026 00:25
@sebastienros sebastienros merged commit c4882ab into release/13.2 Mar 4, 2026
758 of 761 checks passed
@sebastienros sebastienros deleted the sebros/polyglot-yarp branch March 4, 2026 00:28
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 4, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Add polyglot exports for Aspire.Hosting.Yarp

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

* Refine AspireExport descriptions for polyglot-yarp

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

* Use generated methods in yarp apphost

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

* Expand yarp apphost generated method coverage

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

* Expose Yarp transform methods to polyglot apphost

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

---------

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

3 participants