Skip to content

Graduate core Azure deployment APIs to stable - #20820

Merged
Mitch Denny (mitchdenny) merged 1 commit into
mainfrom
mitchdenny-stable-azure-deployment-apis
Oct 8, 2026
Merged

Mitch Denny (mitchdenny) merged 1 commit into
mainfrom
mitchdenny-stable-azure-deployment-apis

Conversation

@mitchdenny

@mitchdenny Mitch Denny (mitchdenny) commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Description

Consumers should no longer need ASPIREAZURE001 suppressions to use the long-standing core Azure deployment APIs. This is the explicitly authorized, attribute-only graduation of AzurePublishingContext, AzureEnvironmentResource, and AzureEnvironmentResourceExtensions.AddAzureEnvironment, WithLocation, and WithResourceGroup in Aspire.Hosting.Azure.

Remove obsolete ASPIREAZURE001 suppressions from consumers that use only these core APIs. Preserve every signature, default, compatibility member, ATS export, method body, and provisioning/deployment behavior. Azure Sandboxes and its suppressions are untouched, as are other experimental declarations and generated */api/*.cs files. No directly related documentation labels these five APIs experimental, so no documentation change is needed.

Dependency: Core pipeline graduation #20809 has merged into main. This PR has been rebased onto that change, preserving its independent graduation and suppression cleanup. AzurePublishingContext exposes the now-stable IReportingStep in its unchanged constructor; ASPIREPIPELINES001 suppression is no longer needed. Retain the still-required ASPIREPIPELINES002 suppression for deployment state management and all other remaining experimental diagnostics. This PR graduates only the five core Azure declarations, not additional pipeline or Sandbox APIs.

User-facing usage

Existing Azure environment configuration no longer requires ASPIREAZURE001 suppression:

var location = builder.AddParameter("deployment-location");
var resourceGroup = builder.AddParameter("deployment-resource-group");

builder.AddAzureEnvironment()
    .WithLocation(location)
    .WithResourceGroup(resourceGroup);

Validation

Run on macOS, with quarantined and outerloop tests excluded. The targeted tests and both playground builds were repeated successfully after rebasing onto the merged pipeline graduation.

./restore.sh

Passed during initial validation: local SDK setup and repository restore; 0 warnings, 0 errors.

dotnet test --project tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class "*.AzureEnvironmentResourceTests" --filter-class "*.AzureEnvironmentResourceExtensionsTests" --filter-class "*.AzureBicepResourceTests" --filter-class "*.AzureRunAsEmulatorModeTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Passed after rebase: 209 tests, 0 failures, 0 skipped. Existing tests compile without the removed core Azure suppressions.

dotnet test --project tests/Aspire.Hosting.Azure.Kubernetes.Tests/Aspire.Hosting.Azure.Kubernetes.Tests.csproj --no-launch-profile -- --filter-class "*.AzureKubernetesInfrastructureTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Passed after rebase: 45 tests, 0 failures, 0 skipped.

dotnet test --project tests/Aspire.Hosting.Foundry.Tests/Aspire.Hosting.Foundry.Tests.csproj --no-launch-profile -- --filter-class "*.PromptAgentTests" --filter-class "*.ToolboxTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Passed after rebase: 76 tests, 0 failures, 0 skipped.

dotnet build playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/FoundryAgentBasic.AppHost.csproj /p:SkipDashboardReference=true /p:SkipNativeBuild=true --verbosity quiet
dotnet build playground/FoundryAgentEnterprise/FoundryAgentEnterprise.AppHost/FoundryAgentEnterprise.AppHost.csproj /p:SkipDashboardReference=true /p:SkipNativeBuild=true --verbosity quiet

Both passed after rebase: 0 warnings, 0 errors.

git diff origin/main...HEAD --check

Passed. An additional normalized-diff check against latest main confirmed exactly five authorized attributes removed and no changes to signatures, defaults, method bodies, ATS exports, compatibility members, unrelated diagnostics, Sandbox files, or generated API files.

No live Azure deployment or full repository test suite was run; this change does not alter runtime behavior. No new tests are added; existing targeted tests cover the preserved behavior.

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

@github-actions

github-actions Bot commented Oct 8, 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 -- 20820

Or

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

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 8, 2026 07:14
@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 8, 2026
@github-actions

This comment has been minimized.

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.

🟢 Approval recommended

The changes are scoped to the authorized experimental attributes and suppressions without altering signatures or behavior.

0 open findings

What changed in this PR

Graduates five core Azure deployment APIs from experimental status while preserving runtime behavior and keeping pipeline contracts experimental.

Changes:

  • Removes ASPIREAZURE001 attributes from the authorized APIs.
  • Retains required pipeline diagnostic suppressions.
  • Removes obsolete Azure suppressions from consumers, tests, and playgrounds.
File Description
tests/​Aspire.Hosting.Foundry.Tests/​ToolboxTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Foundry.Tests/​PromptAgentTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Azure.Tests/​AzureUserAssignedIdentityTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Azure.Tests/​AzureRunAsEmulatorModeTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Azure.Tests/​AzureEnvironmentResourceTests.cs Removes Azure suppression while retaining pipeline suppression.
tests/​Aspire.Hosting.Azure.Tests/​AzureEnvironmentResourceExtensionsTests.cs Removes Azure suppression while retaining pipeline suppressions.
tests/​Aspire.Hosting.Azure.Tests/​AzureDeployerTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Azure.Tests/​AzureContainerAppExpressEndpointTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Azure.Tests/​AzureBicepResourceTests.cs Removes obsolete Azure suppression.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​AzureKubernetesInfrastructureTests.cs Removes obsolete Azure suppression.
src/​Shared/​CrossScopeAcrPullIdentityPreparer.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Foundry/​Aspire.Hosting.Foundry.csproj Removes ASPIREAZURE001 from NoWarn.
src/​Aspire.Hosting.Azure/​Provisioning/​AzureProvisionerExtensions.cs Removes local suppression around AddAzureEnvironment.
src/​Aspire.Hosting.Azure/​AzureResourcePreparer.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure/​AzurePublishingContext.cs Graduates the type and suppresses its experimental pipeline dependency.
src/​Aspire.Hosting.Azure/​AzureProvisioningController.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure/​AzureEnvironmentResourceExtensions.cs Graduates the three environment extension methods.
src/​Aspire.Hosting.Azure/​AzureEnvironmentResource.cs Graduates the resource and adds required pipeline suppressions.
src/​Aspire.Hosting.Azure/​AzureBicepResource.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.Kubernetes/​AzureKubernetesEnvironmentResource.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.Kubernetes/​AzureKubernetesEnvironmentResource.AksPipeline.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.Kubernetes/​AzureKubernetesEnvironmentExtensions.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.ContainerRegistry/​AzureContainerRegistryHelpers.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.AppService/​AzureAppServiceWebSiteResource.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.AppService/​AzureAppServiceEnvironmentResource.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.AppContainers/​AzureContainerAppResource.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.AppContainers/​AzureContainerAppExtensions.cs Removes obsolete Azure suppression.
src/​Aspire.Hosting.Azure.AppContainers/​AzureContainerAppEnvironmentResource.cs Removes obsolete Azure suppression.
playground/​publishers/​Publishers.AppHost/​AppHost.cs Removes obsolete Azure suppression.
playground/​pipelines/​Pipelines.Library/​DistributedApplicationPipelineExtensions.cs Removes obsolete Azure suppression.
playground/​FoundryAgentEnterprise/​FoundryAgentEnterprise.AppHost/​FoundryAgentEnterprise.AppHost.csproj Removes ASPIREAZURE001 from NoWarn.
playground/​FoundryAgentBasic/​FoundryAgentBasic.AppHost/​FoundryAgentBasic.AppHost.csproj Removes ASPIREAZURE001 from NoWarn.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all 32 changed files, surrounding Azure consumers, diagnostic declarations, existing review threads, and relevant regression coverage. No concrete issues found. Local normalized full-file comparison confirms only the five intended experimental-attribute removals and related suppression/import cleanup; diff whitespace check passed. GitHub CI reports 108 successful and 24 skipped checks; author-reported targeted tests are separate evidence. No local builds/tests or live Azure deployment were run because runtime code, signatures, defaults, and ATS exports are unchanged.

@github-actions

This comment has been minimized.

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.

🟢 Approval recommended

The changes are consistently attribute-only, preserve pipeline diagnostics, and match the explicitly authorized scope.

0 open findings

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Remove ASPIREAZURE001 from the five long-standing core Azure declarations and clean obsolete consumer suppressions. Keep Sandbox files and pipeline APIs unchanged, retaining the pipeline diagnostics needed on main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mitchdenny
Mitch Denny (mitchdenny) force-pushed the mitchdenny-stable-azure-deployment-apis branch from a9b483f to 1bf766f Compare October 8, 2026 22:46
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Tests selector

12 / 98 PR test projects · 3 PR jobs, from 32 changed files.

Selected PR test projects (12 / 98)

Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Provisioning.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests

Selected PR jobs (3)

extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

⚠️ 7 of the 12 selected test projects come from a single change — src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs.

🔧 src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 6 via the project graph: Aspire.Hosting.Blazor.Tests (2 hops), Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Dotnet.Tests (2 hops), Aspire.Hosting.Radius.Tests (2 hops), Aspire.Hosting.Tests, Aspire.Playground.Tests (2 hops)

🔧 src/Aspire.Hosting.Azure/AzureBicepResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 2 via the project graph: Aspire.Hosting.Azure.Kusto.Tests (2 hops), Aspire.Hosting.Azure.Provisioning.Tests (2 hops)

🔧 src/Aspire.Hosting.Azure.ContainerRegistry/AzureContainerRegistryHelpers.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 1 via the project graph: Aspire.Hosting.Docker.Tests

🔧 src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesEnvironmentExtensions.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesEnvironmentResource.AksPipeline.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesEnvironmentResource.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

📄 playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/FoundryAgentBasic.AppHost.csproj (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/FoundryAgentEnterprise/FoundryAgentEnterprise.AppHost/FoundryAgentEnterprise.AppHost.csproj (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/pipelines/Pipelines.Library/DistributedApplicationPipelineExtensions.cs (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/publishers/Publishers.AppHost/AppHost.cs (changed)
→ 1 directly: Aspire.Playground.Tests

🔧 src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebSiteResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzureEnvironmentResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzureEnvironmentResourceExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzureProvisioningController.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzurePublishingContext.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzureResourcePreparer.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/Provisioning/AzureProvisionerExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.csproj (changed source)
→ 1 directly: Aspire.Hosting.Foundry.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesInfrastructureTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureBicepResourceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureContainerAppExpressEndpointTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureEnvironmentResourceExtensionsTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureEnvironmentResourceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureRunAsEmulatorModeTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Foundry.Tests/PromptAgentTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Foundry.Tests

🧪 tests/Aspire.Hosting.Foundry.Tests/ToolboxTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Foundry.Tests

Job reasons

Job Triggered by
extension-e2e affected project Aspire.Hosting.Azure.Functions
polyglot • affected project Aspire.Hosting.Azure.AppContainers
• affected project Aspire.Hosting.Azure.Provisioning.AppContainers
typescript-api-compat affected project Aspire.Hosting.Azure.AppContainers

Selection computed for commit 1bf766f.

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.

🟢 Approval recommended

The changes are consistently attribute-only, preserve unrelated diagnostics, and introduce no unresolved correctness issues.

0 open findings

🧠 Review effort: Balanced

@mitchdenny
Mitch Denny (mitchdenny) merged commit 22c172e into main Oct 8, 2026
132 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Oct 8, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1851

Generated by PR Documentation Check · copilot · auto · 60.2 AIC · ⌖ 12.3 AIC · ⊞ 20.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1851 targeting release/17.0.

Triggered signals: pr_body_has_cli_flag_mention, pr_body_has_deprecation_marker, pr_body_has_user_facing_section — the PR body includes a "User-facing usage" section showing AddAzureEnvironment().WithLocation(...).WithResourceGroup(...) no longer needs ASPIREAZURE001 suppression, and explicitly states the suppression should be removed from consumers using only these core APIs.

Found an existing docs example in integrations/cloud/azure/role-assignments.mdx that still carried #pragma warning disable ASPIREAZURE001 // AzureEnvironmentResource is Experimental before a pipeline-step code sample using AzureEnvironmentResource.PrepareResourcesStepName. Since this PR graduates AzureEnvironmentResource, AzurePublishingContext, AddAzureEnvironment, WithLocation, and WithResourceGroup to stable (removing their [Experimental("ASPIREAZURE001")] attributes per the diff of AzureEnvironmentResource.cs, AzureEnvironmentResourceExtensions.cs, and AzurePublishingContext.cs), the pragma is now obsolete and would mislead readers into adding an unnecessary suppression. Removed the two pragma lines (directive + blank line) from the code sample.

Note

This draft PR needs human review before merging.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants