Skip to content

Add polyglot exports for Azure Sql#14782

Merged
sebastienros merged 2 commits intorelease/13.2from
sebros/polyglot-azure-sql
Feb 28, 2026
Merged

Add polyglot exports for Azure Sql#14782
sebastienros merged 2 commits intorelease/13.2from
sebros/polyglot-azure-sql

Conversation

@sebastienros
Copy link
Contributor

Related to #14069

Copilot AI review requested due to automatic review settings February 27, 2026 20:44
@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 -- 14782

Or

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

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 ATS/polyglot (TypeScript AppHost) export coverage for Aspire.Hosting.Azure.Sql by annotating key Azure SQL extension methods and introducing a TypeScript ValidationAppHost to exercise the generated SDK surface (per #14069).

Changes:

  • Annotate Azure SQL extension methods with [AspireExport] and mark obsolete APIs with [AspireExportIgnore].
  • Add a TypeScript ValidationAppHost for Aspire.Hosting.Azure.Sql (configs, lockfile, and sample apphost).
  • Check in generated TypeScript SDK artifacts under .modules/ for the ValidationAppHost.

Reviewed changes

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

Show a summary per file
File Description
src/Aspire.Hosting.Azure.Sql/AzureSqlExtensions.cs Adds ATS export metadata for Azure SQL builder APIs and documents/ignores obsolete methods for polyglot.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/tsconfig.json Adds TS compile configuration for the validation host, including .modules/ sources.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/package.json Adds Node/TS project metadata and scripts for the validation host.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/package-lock.json Locks Node dependencies for the validation host.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/apphost.ts Exercises exported APIs (addAzureSqlServer, addDatabase, withDefaultAzureSku, runAsContainer).
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/apphost.run.json Local run profile for the validation host.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.aspire/settings.json Declares TypeScript AppHost settings and referenced package.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/aspire.ts Generated TypeScript SDK for the exported capabilities.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/base.ts Generated TypeScript SDK base utilities.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/transport.ts Generated TypeScript JSON-RPC transport and handle/callback infrastructure.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/.codegen-hash Tracks codegen inputs for SDK regeneration.
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

src/Aspire.Hosting.Azure.Sql/AzureSqlExtensions.cs:151

  • WithDefaultAzureSku is now exported to ATS/TypeScript, but it doesn't validate builder for null. Most other exported extension methods in this repo call ArgumentNullException.ThrowIfNull(builder); up front; without that, a malformed ATS call can surface as a NullReferenceException instead of a clear argument error.
    public static IResourceBuilder<AzureSqlDatabaseResource> WithDefaultAzureSku(this IResourceBuilder<AzureSqlDatabaseResource> builder)
    {
        builder.Resource.UseDefaultAzureSku = true;
        return builder;

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit d6c5e79:

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
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 ❌ Upload failed
StopNonInteractiveMultipleAppHostsShowsError ❌ Upload failed
StopNonInteractiveSingleAppHost ❌ Upload failed
StopWithNoRunningAppHostExitsSuccessfully ❌ Upload failed

📹 Recordings uploaded automatically from CI run #22507400017

@sebastienros sebastienros merged commit 5168129 into release/13.2 Feb 28, 2026
680 of 683 checks passed
@sebastienros sebastienros deleted the sebros/polyglot-azure-sql branch February 28, 2026 00:31
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 28, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Add polyglot exports for Azure Sql

* PR feedback
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.

4 participants