Skip to content

Remove obsolete ATS export shims - #16624

Merged
Sébastien Ros (sebastienros) merged 3 commits into
mainfrom
sebastienros/ats-environment-cleanup
May 1, 2026
Merged

Remove obsolete ATS export shims#16624
Sébastien Ros (sebastienros) merged 3 commits into
mainfrom
sebastienros/ats-environment-cleanup

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

The ATS surface had several obsolete compatibility shims that continued to generate extra polyglot SDK methods even after the unified withEnvironment and addRoute exports were available. This removes those obsolete internal exports so generated SDKs expose the unified methods instead of deprecated aliases.

This deletes the obsolete environment and YARP shim methods, updates the capability text baselines, and refreshes generated snapshots across TypeScript, Python, Java, Rust, and Go.

Reported during 13.3 validation as confusing

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?

Remove obsolete internal compatibility shims from the ATS export surface so generated polyglot SDKs only expose the unified methods.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes obsolete ATS/polyglot compatibility shims (environment-variable helpers and a YARP route shim) so generated SDKs expose the unified withEnvironment(...) and addRoute(...) APIs instead of deprecated aliases.

Changes:

  • Removed internal AspireExport shims for legacy withEnvironment* exports and the YARP addRouteCluster shim.
  • Updated capabilities baselines and refreshed generated SDK snapshots across TypeScript, Python, Java, Rust, and Go.
  • Removed a TypeScript generator test that asserted deprecated JSDoc generation for the obsolete exports.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts Snapshot updated to remove generated withEnvironment* shim methods and RPCs.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/HostingContainerResourceCapabilities.verified.txt Capabilities snapshot updated to remove withEnvironment* shim capability entries.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs Removed test asserting deprecated JSDoc for obsolete exports.
tests/Aspire.Hosting.CodeGeneration.Rust.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.rs Snapshot updated to remove generated with_environment_* shim methods.
tests/Aspire.Hosting.CodeGeneration.Python.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.py Snapshot updated to remove shim abstract methods/kwargs and implementations.
tests/Aspire.Hosting.CodeGeneration.Java.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.java Snapshot updated to remove shim methods (and helper overload) for withEnvironment*.
tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go Snapshot updated to remove shim methods for WithEnvironment*.
src/Aspire.Hosting/ResourceBuilderExtensions.cs Removed obsolete ATS-only exported shim extension methods for environment variable setting.
src/Aspire.Hosting/api/Aspire.Hosting.Capabilities.txt Capabilities baseline updated to remove obsolete withEnvironment* capabilities.
src/Aspire.Hosting.Yarp/ConfigurationBuilder/IYarpConfigurationBuilder.cs Removed obsolete exported shim AddRouteCluster.
src/Aspire.Hosting.SqlServer/api/Aspire.Hosting.SqlServer.ats.txt ATS capabilities baseline updated to drop obsolete withEnvironment* capability entries.
src/Aspire.Hosting.Azure/AzureBicepResourceExtensions.cs Removed obsolete ATS-only exported shim methods for Bicep output / Key Vault secret env var helpers.

Comment thread src/Aspire.Hosting/api/Aspire.Hosting.Capabilities.txt
Comment thread src/Aspire.Hosting.Azure/AzureBicepResourceExtensions.cs
@github-actions

github-actions Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

🚀 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 -- 16624

Or

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

@sebastienros

Copy link
Copy Markdown
Contributor Author

/backport to release/13.3

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/13.3 (link to workflow run)

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

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 76 recordings uploaded (commit e851c1b)

View all recordings
Status Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ 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
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ▶️ 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
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View Recording
DoListStepsShowsPipelineSteps ▶️ View Recording
DocsCommand_RendersInteractiveMarkdownFromLocalSource ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ▶️ 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
InteractiveCSharpInitCreatesExpectedFiles ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
OtelLogsReturnsStructuredLogsFromStarterAppCore ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View Recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ 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 #25194981797

@sebastienros
Sébastien Ros (sebastienros) merged commit 7647ba2 into main May 1, 2026
285 checks passed
@github-actions github-actions Bot added this to the 13.4 milestone May 1, 2026
@sebastienros
Sébastien Ros (sebastienros) deleted the sebastienros/ats-environment-cleanup branch May 1, 2026 02:27
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

No documentation PR is required for this change.

This PR removes obsolete internal ATS export shims (backward compatibility aliases for polyglot SDK generation) in favor of the already-shipped unified withEnvironment and addRoute exports. The changes are internal refactoring with no new public API surface, no new features, no configuration options, and no user-facing behavioral changes that would require documentation updates.

Generated by PR Documentation Check for issue #16624 · ● 106.7K ·

Nell Shamrell-Harrington (nellshamrell) pushed a commit to nellshamrell/aspire that referenced this pull request May 18, 2026
* Remove obsolete ATS export shims

Remove obsolete internal compatibility shims from the ATS export surface so generated polyglot SDKs only expose the unified methods.

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

* Update Azure deployment diagnostics snapshot

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants