Skip to content

Add polyglot exports for Aspire.Hosting.Azure.WebPubSub#14907

Merged
davidfowl merged 4 commits intorelease/13.2from
sebros/polyglot-azure-webpubsub
Mar 4, 2026
Merged

Add polyglot exports for Aspire.Hosting.Azure.WebPubSub#14907
davidfowl merged 4 commits intorelease/13.2from
sebros/polyglot-azure-webpubsub

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
@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 -- 14907

Or

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

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 adds polyglot (capability-based) exports for Aspire.Hosting.Azure.WebPubSub and introduces a TypeScript “ValidationAppHost” playground with generated ATS client modules to validate the exports end-to-end.

Changes:

  • Annotated AddAzureWebPubSub, AddHub overloads, and AddEventHandler overloads with AspireExport for polyglot app hosts.
  • Added a TypeScript validation AppHost project (tsconfig/package/apphost/run profile + .aspire settings).
  • Added generated TypeScript ATS transport/base/sdk modules and a codegen hash.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Aspire.Hosting.Azure.WebPubSub/AzureWebPubSubExtensions.cs Adds AspireExport attributes to expose WebPubSub APIs to polyglot hosts
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/tsconfig.json TypeScript build configuration for the validation host
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/package.json Declares dependencies and scripts for the validation host
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/apphost.ts Minimal TypeScript AppHost entrypoint using the generated modules
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/apphost.run.json Run profile/environment variables for aspire run
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/transport.ts JSON-RPC transport, handle/callback/cancellation plumbing for ATS
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/base.ts Common TS wrappers for reference expressions and .NET collection helpers
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/aspire.ts Generated ATS TypeScript SDK including the new WebPubSub capabilities
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/.codegen-hash Records codegen hash for the generated module set
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.aspire/settings.json Configures the polyglot validation host package mapping
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/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

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 846a99b:

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 ❌ Upload failed
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 #22648232728

sebastienros and others added 2 commits March 3, 2026 15:14
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix addHub collision: remove [AspireExport] from simple overload,
  keep fuller overload with capability ID 'addHub'
- Add [AspireExportIgnore] to WithRoleAssignments with WebPubSubBuiltInRole[]
- Create AzureWebPubSubRole internal enum for ATS-compatible role shim
- Add polyglot WithRoleAssignments shim with [AspireExport]
- Update validation apphost.ts to exercise all exported APIs
- Regenerate TypeScript SDK

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sebastienros sebastienros requested a review from davidfowl March 4, 2026 00:39
@davidfowl davidfowl merged commit 7a4d574 into release/13.2 Mar 4, 2026
384 checks passed
@davidfowl davidfowl deleted the sebros/polyglot-azure-webpubsub branch March 4, 2026 01:53
@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.Azure.WebPubSub

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

* Refine AspireExport descriptions for polyglot-azure-webpubsub

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

* Use generated methods in azure-webpubsub apphost

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

* Fix AspireExport coverage for Azure WebPubSub integration

- Fix addHub collision: remove [AspireExport] from simple overload,
  keep fuller overload with capability ID 'addHub'
- Add [AspireExportIgnore] to WithRoleAssignments with WebPubSubBuiltInRole[]
- Create AzureWebPubSubRole internal enum for ATS-compatible role shim
- Add polyglot WithRoleAssignments shim with [AspireExport]
- Update validation apphost.ts to exercise all exported APIs
- Regenerate TypeScript SDK

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