Skip to content

Refine polyglot exports for Aspire.Hosting.Kubernetes#15003

Merged
davidfowl merged 8 commits intorelease/13.2from
sebros/polyglot-kube
Mar 7, 2026
Merged

Refine polyglot exports for Aspire.Hosting.Kubernetes#15003
davidfowl merged 8 commits intorelease/13.2from
sebros/polyglot-kube

Conversation

@sebastienros
Copy link
Member

@sebastienros sebastienros commented Mar 6, 2026

Description

  • Completes Kubernetes polyglot export coverage, including the publish callback surface and exported Kubernetes environment resource.
  • Preserves the XML documentation cleanup while removing the duplicate constructor that broke the branch build.
  • Updates the TypeScript ValidationAppHost and regenerated SDK for the Kubernetes hosting integration.

Validation:

  • dotnet build src/Aspire.Hosting.Kubernetes/Aspire.Hosting.Kubernetes.csproj /p:SkipNativeBuild=true
  • cd playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost && npm ci --no-fund --no-audit && npx tsc --noEmit

Fixes # (issue)

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 and 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?

sebastienros and others added 3 commits March 5, 2026 20:16
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 6, 2026 15:25
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 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 -- 15003

Or

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

sebastienros and others added 3 commits March 6, 2026 07:25
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 Type System (ATS) / polyglot export coverage for Aspire.Hosting.Kubernetes, enabling TypeScript (and other polyglot) AppHosts to call Kubernetes publishing APIs and access required resource properties in callback surfaces.

Changes:

  • Added [AspireExport] capabilities for PublishAsKubernetesService(...), AddKubernetesEnvironment(...), and WithProperties(...).
  • Exported KubernetesResource and KubernetesEnvironmentResource with ExposeProperties = true to support property access in callbacks.
  • Added a new TypeScript ValidationAppHost (including generated .modules SDK and project scaffolding files).

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Aspire.Hosting.Kubernetes/KubernetesServiceExtensions.cs Exports publishAsKubernetesService capability for polyglot AppHosts.
src/Aspire.Hosting.Kubernetes/KubernetesResource.cs Exposes KubernetesResource properties to ATS for callback scenarios.
src/Aspire.Hosting.Kubernetes/KubernetesEnvironmentResource.cs Exposes environment properties to ATS (Helm chart/storage defaults).
src/Aspire.Hosting.Kubernetes/KubernetesEnvironmentExtensions.cs Exports addKubernetesEnvironment and withProperties capabilities (and annotates resource name).
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/tsconfig.json Adds TS compiler configuration for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/package.json Adds npm project manifest for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/package-lock.json Locks npm dependencies for reproducible validation builds.
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/apphost.ts Validates new exports and property access via generated TypeScript SDK.
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/apphost.run.json Adds run profile/environment variables for AppHost execution.
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/.modules/* Adds generated TypeScript ATS transport/base/sdk outputs for validation.
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/.aspire/settings.json Declares polyglot AppHost settings (language + package list).
playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/.aspire/settings.json Adds an integration-root settings file (currently language-only).
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Kubernetes/ValidationAppHost/package-lock.json: Language not supported

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

github-actions bot commented Mar 6, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 42b4df7:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ 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 ❌ Upload failed
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ❌ Upload failed
SecretCrudOnDotNetAppHost ❌ Upload failed
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ❌ Upload failed
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ❌ Upload failed
TypeScriptAppHostWithProjectReferenceIntegration ❌ Upload failed

📹 Recordings uploaded automatically from CI run #22774928021

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@davidfowl davidfowl merged commit 435e57d into release/13.2 Mar 7, 2026
757 of 763 checks passed
@davidfowl davidfowl deleted the sebros/polyglot-kube branch March 7, 2026 16:58
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 7, 2026
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