Skip to content

Support Azure Front Door Private Link for App Service - #21396

Merged
Eric Erhardt (eerhardt) merged 6 commits into
mainfrom
eerhardt-app-service-private-origins
Nov 5, 2026
Merged

Eric Erhardt (eerhardt) merged 6 commits into
mainfrom
eerhardt-app-service-private-origins

Conversation

@eerhardt

@eerhardt Eric Erhardt (eerhardt) commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

Follow-up to #21228: App Service workloads can now be private origins behind Azure Front Door using the same WithAzureFrontDoorPrivateLink API.

Each App Service origin targets its own Microsoft.Web/sites resource (sites group), rather than the shared App Service plan. The opt-in disables public network access on every workload website in the environment and selects Front Door Premium. Existing plans are supported; deployment slots are supported by targeting the production site, since Front Door Private Link cannot target a slot; the slot has public access disabled and is swapped into production. Aspire creates the production site only if it does not exist, so enabling Private Link on an existing public site does not disable its public access; disable it on the site yourself. The separately provisioned dashboard is unchanged.

The new, unreleased experimental IAzureCdnPrivateLinkTarget contract from #21228 now resolves resource ID and region outputs per origin. Container Apps continues to share its environment target. App Service maintains stable website resource identities during dependency discovery, and the deployment graph provisions websites before Front Door. Published infrastructure exposes separately published website outputs as explicit inputs instead of referencing modules absent from main.bicep.

Fixes # (issue)

User-facing usage

C#:

#pragma warning disable ASPIREAZURE003

var environment = builder.AddAzureAppServiceEnvironment("env").WithDashboard(false);
var frontDoor = builder.AddAzureFrontDoor("frontdoor");
environment.WithAzureFrontDoorPrivateLink(frontDoor);

var api = builder.AddProject<Projects.Api>("api").WithExternalHttpEndpoints();
frontDoor.WithOrigin(api);

#pragma warning restore ASPIREAZURE003

TypeScript (verified against generated SDK signatures):

const environment = await builder.addAzureAppServiceEnvironment("env").withDashboard(false);
const frontDoor = await builder.addAzureFrontDoor("frontdoor");
await environment.withAzureFrontDoorPrivateLink(frontDoor);

const api = await builder.addProject("api", "../Api/Api.csproj")
    .withExternalHttpEndpoints();
await frontDoor.withOrigin(api);

After deployment, the resource owner must approve Front Door's pending managed private endpoint connection on each website:

az network private-endpoint-connection list --type Microsoft.Web/sites --name <website-name> --resource-group <resource-group>
az network private-endpoint-connection approve --id <connection-id>

App Service does not provide Container Apps-style environment-local ingress. WithReference still resolves to website hostnames, so service-to-service callers need Front Door URLs or their own private networking/DNS. Passing Front Door outputs back to its own origins creates a deployment cycle; configure those URLs separately after deployment.

Validation

  • .\restore.cmd — passed.
  • dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class "*.AzureFrontDoorTests" --filter-class "*.AzureFrontDoorPrivateLinkTests" --filter-class "*.AzureFrontDoorAppServicePrivateLinkTests" --filter-class "*.AzureEnvironmentResourceTests" --filter-class "*.AzureAppServiceTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" — 117 passed.
  • dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" — 2,118 passed, 5 skipped, 1 failed. The failure was the unrelated storage emulator startup test below.
  • dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-method "*.AzureStorageEmulator_WithPersistentLifetime_ReusesContainersAndPorts" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" — 1 passed on isolated retry.
  • aspire publish --apphost playground\FrontDoorPrivateLinkSmoke\Smoke.AppHost\Smoke.AppHost.csproj --output-path <scratch>\publish --non-interactive — passed using a temporary two-origin AppHost with source project references.
  • az bicep build --file <published-file> --stdout — passed for all six generated Bicep artifacts.
  • Set-Location playground\FrontDoorPrivateLinkSmoke\TypeScript; dotnet run --project ..\..\..\src\Aspire.Cli\Aspire.Cli.csproj --no-launch-profile -- restore --non-interactive — SDK generation succeeded; confirmed withAzureFrontDoorPrivateLink on the generated App Service resource and fluent promise. npm reported the intentionally absent temporary package.json; this was a generated API surface check, not a TypeScript runtime test.
  • git diff --check — passed.

Live Azure deployment

Deployed in westus3 using the requested tenant's only subscription, with two distinct App Service websites and Front Door Premium:

aspire deploy --apphost playground\FrontDoorPrivateLinkSmoke\Smoke.AppHost\Smoke.AppHost.csproj --output-path <scratch>\deploy --non-interactive --include-exception-details

Result: 27/27 deployment steps succeeded. Both managed private endpoint connections were approved; both websites are running with publicNetworkAccess: Disabled.

Verified at 2026-10-29 17:01:43 UTC, after Front Door propagation:

Origin Public network access Direct website HTTPS Front Door HTTPS
api-ryygo2c7mutbk.azurewebsites.net Disabled 403 200
web-ryygo2c7mutbk.azurewebsites.net Disabled 403 200

Both Front Door responses contained exactly aspire-appservice-private-link-ok. Both website private endpoint connections were Approved. Test resources are retained in rg-aspire-appservice-private-20261029 for inspection and continue to incur Azure charges.

Security considerations

This is an opt-in ingress restriction. It disables public access on all workload websites, not only registered origins. Front Door uses website-specific Private Link targets, the website host header, HTTPS origin forwarding, and certificate-name validation. Managed private endpoint requests require explicit approval by the resource owner. The dashboard is separate and is not locked down by this feature; use WithDashboard(false) when it is not needed. No automatic approval or service-to-service networking is introduced. Security review is still needed for the network-isolation guarantees.

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

Resolve Private Link targets per origin, disable public website access, and wire website outputs into Front Door publishing and deployment.

Co-authored-by: Copilot App <[email protected]>
@github-actions

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

Or

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

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 29, 2026
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 29, 2026 17:03
@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.

🟡 Changes recommended

App Service ingress restrictions and website-before-Front-Door provisioning lack automated deployment regression coverage verifying direct HTTPS denial and successful Front Door responses for two websites.

1 open issue
What changed in this PR

Extends the Front Door Private Link support from #21228 to Azure App Service, using each website as a private origin while preserving Container Apps’ shared-environment targeting.

Changes:

  • Adds website-specific Private Link targets, disables public access on workload websites, and rejects deployment slots.
  • Preserves website resource identities during dependency discovery and exposes separately published website outputs as infrastructure inputs.
  • Adds regression tests, generated infrastructure snapshots, and configuration and approval documentation.
File Description
tests/​Aspire.Hosting.Azure.Tests/​Snapshots/​AzureFrontDoorAppServicePrivateLinkTests.WebsitesWithoutOriginsAreAlsoPrivate.verified.bicep Captures access restrictions for non-origin websites.
tests/​Aspire.Hosting.Azure.Tests/​Snapshots/​AzureFrontDoorAppServicePrivateLinkTests.PublishExposesWebsiteOutputsAsInfrastructureInputs.verified.bicep Captures explicit website output inputs.
tests/​Aspire.Hosting.Azure.Tests/​Snapshots/​AzureFrontDoorAppServicePrivateLinkTests.PrivateLinkTargetsEachWebsite_connectBeforeOrigins=True.verified.txt Captures per-website targets when connected before origins.
tests/​Aspire.Hosting.Azure.Tests/​Snapshots/​AzureFrontDoorAppServicePrivateLinkTests.PrivateLinkTargetsEachWebsite_connectBeforeOrigins=False.verified.txt Captures per-website targets when connected after origins.
tests/​Aspire.Hosting.Azure.Tests/​Snapshots/​AzureFrontDoorAppServicePrivateLinkTests.MixedComputeEnvironmentsUseTheirOwnPrivateLinkTargets.verified.txt Captures mixed private and public origins.
tests/​Aspire.Hosting.Azure.Tests/​Snapshots/​AzureFrontDoorAppServicePrivateLinkTests.ExistingPlanCanHostPrivateWebsites.verified.bicep Captures private websites on existing plans.
tests/​Aspire.Hosting.Azure.Tests/​AzureFrontDoorPrivateLinkTests.cs Adapts tests to per-origin target resolution.
tests/​Aspire.Hosting.Azure.Tests/​AzureFrontDoorAppServicePrivateLinkTests.cs Tests publishing, targeting, validation, and run-mode behavior.
src/​Aspire.Hosting.Azure/​IAzureCdnPrivateLinkTarget.cs Resolves resource IDs and regions per origin.
src/​Aspire.Hosting.Azure/​AzurePublishingContext.cs Exposes separate deployment-target outputs as inputs.
src/​Aspire.Hosting.Azure.FrontDoor/​README.md Documents App Service setup, approval, and networking limits.
src/​Aspire.Hosting.Azure.FrontDoor/​AzureFrontDoorPrivateLinkExtensions.cs Documents App Service support and restrictions.
src/​Aspire.Hosting.Azure.FrontDoor/​AzureFrontDoorExtensions.cs Configures and tracks per-origin Private Link targets.
src/​Aspire.Hosting.Azure.AppService/​README.md Introduces private origins and links to setup guidance.
src/​Aspire.Hosting.Azure.AppService/​AzureAppServiceWebsiteContext.cs Disables public access and emits Private Link outputs.
src/​Aspire.Hosting.Azure.AppService/​AzureAppServiceEnvironmentResource.cs Supplies stable website targets and validates slot restrictions.
src/​Aspire.Hosting.Azure.AppService/​AzureAppServiceEnvironmentContext.cs Reuses website resources during deployment preparation.
src/​Aspire.Hosting.Azure.AppContainers/​AzureContainerAppEnvironmentResource.cs Adapts shared-environment targeting to the revised contract.

Review effort: Balanced

Emit website ID and normalized location outputs regardless of public network access so App Service targets expose them consistently, as Container Apps does.

Co-authored-by: Copilot App <[email protected]>

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.

🟡 Changes recommended

Parameter-name collisions can make distinct Front Door origins use the last target’s ID and location, and App Service ingress restrictions lack deployment E2E regression coverage.

2 open issues

Review effort: Balanced

@github-actions

This comment has been minimized.

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

🔵 Needs a closer look

The new tests lack deployment E2E coverage for the two-website scenario, leaving provisioning order, private-endpoint approval, Front Door responses, and blocked direct access without regression protection.

2 open issues

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

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

🟡 Changes recommended

Fallback parameter names can still collide and overwrite earlier bindings, causing an origin to receive another target’s Private Link resource ID and location.

3 open issues

Review effort: Balanced

Private Link targets the production site; slots stay private and are swapped into production.

Co-authored-by: Copilot App <[email protected]>
@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.

🟡 Changes recommended

Fallback-name collisions can bind Front Door origins to the wrong target, while enabling Private Link with deployment slots can leave existing production sites publicly accessible.

4 open issues

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Tests selector

16 / 101 PR test projects · 3 PR jobs, from 44 changed files.

Selected PR test projects (16 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Azure.EntraId.Tests, 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.Python.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.RemoteHost.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

⚠️ 8 of the 16 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
→ 7 via the project graph: Aspire.Hosting.Azure.EntraId.Tests, 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/AzurePublishingContext.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 6 via the project graph: Aspire.Hosting.Azure.Kusto.Tests (2 hops), Aspire.Hosting.Azure.Provisioning.Tests (2 hops), Aspire.Hosting.CodeGeneration.Python.Tests (2 hops), Aspire.Hosting.Docker.Tests (2 hops), Aspire.Hosting.Foundry.Tests (2 hops), Aspire.Hosting.RemoteHost.Tests (2 hops)

🧪 tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorAppServicePrivateLinkTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests
→ 1 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests

📦 affected project Aspire.Hosting.Azure.Storage
→ 1 test: Aspire.Cli.EndToEnd.Tests

🔧 src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentContext.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/AzureAppServiceWebsiteContext.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

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

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

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

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

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceContainerWithoutTargetPortUsesDefaultPort.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithApplicationInsightsSetsAppSettings.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithoutTargetPortUsesContainerPort.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceToEnvironmentWithoutDashboard.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithArgs.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDelegatedSubnet.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDelegatedSubnetWithoutDeploymentSlot.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlot.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlotParameter.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPort.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPortMultipleEndpoints.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddContainerAppEnvironmentAddsDeploymentTargetWithContainerAppToProjectResources.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddDockerfileWithAppServiceInfrastructureAddsDeploymentTargetWithAppServiceToContainerResources.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AzureAppServiceEnvironmentCanPublishExistingAppServicePlan#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AzureAppServiceSupportBaitAndSwitchResources.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.CanPreserveHttpSchemeUsingWithHttpsUpgrade.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.ConditionalExpressionWithParameterCondition.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EndpointReferenceToFoundryHostedAgentIsResolvedAcrossComputeEnvironments.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EndpointReferencesAreResolvedAcrossProjects.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EnvironmentVariableWithBicepOutputReferenceProviderIsPublishedAsItsOutput.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.KeyvaultReferenceHandling.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.PublishAsAzureAppServiceWebsite_CanOverrideEnvironmentDelegatedSubnet.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.PublishToAppService_WithDashedConnectionStringName_UsesPortableAlias.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.ResourceWithProbes.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.UnknownManifestExpressionProviderIsHandledWithAllocateParameter.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.DeploymentSlotsTargetProductionSiteAndStayPrivate_parameterized=False.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.DeploymentSlotsTargetProductionSiteAndStayPrivate_parameterized=True.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.ExistingPlanCanHostPrivateWebsites.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.MixedComputeEnvironmentsUseTheirOwnPrivateLinkTargets.verified.txt (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.PrivateLinkTargetsEachWebsite_connectBeforeOrigins=False.verified.txt (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.PrivateLinkTargetsEachWebsite_connectBeforeOrigins=True.verified.txt (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.PublishExposesWebsiteOutputsAsInfrastructureInputs.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorAppServicePrivateLinkTests.WebsitesWithoutOriginsAreAlsoPrivate.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureUserAssignedIdentityTests.WithAzureUserAssignedIdentity_WithRoleAssignments_AzureAppService_Works#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.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 1a495ae.

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.

🔵 Needs a closer look

Human assessment is needed because an origin consuming an App Service environment output can create a provisioning cycle between the website and Front Door through generic private-endpoint prerequisite handling.

1 open issue
3 resolved since last review

Review effort: Balanced

@IEvangelist

Copy link
Copy Markdown
Member

PR Testing Report

PR Information

  • PR: microsoft/aspire#21396
  • Title: Support Azure Front Door Private Link for App Service
  • Head commit: 1a495aeabe5c43356cdd29b878213b214450a000
  • Tested at: 2026-11-05, approximately 13:15-13:30 CST
  • Execution: Local Windows, isolated dogfood installation and fresh generated apps.
  • Approved scope: Offline artifact, regression, publishing, boundary, and negative validation. No live Azure provisioning.

Artifact Version Verification

Changes Analyzed

Files Changed

  • src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs: Origin-aware Private Link target interface implementation.
  • src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentContext.cs: Reuse stable website resource identities.
  • src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentResource.cs: Per-website target resource IDs and locations.
  • src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebsiteContext.cs: Public access restrictions, production-site targeting for slots, and website outputs.
  • src/Aspire.Hosting.Azure.AppService/README.md: App Service usage and limitations.
  • src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs: Per-target parameters, deduplication, and origin configuration.
  • src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorPrivateLinkExtensions.cs: Expanded supported environments and contract documentation.
  • src/Aspire.Hosting.Azure.FrontDoor/README.md: Usage, approval, slots, and networking caveats.
  • src/Aspire.Hosting.Azure/AzurePublishingContext.cs: Explicit inputs for outputs from separately published deployment targets.
  • src/Aspire.Hosting.Azure/IAzureCdnPrivateLinkTarget.cs: Origin-specific resource ID and location resolution.
  • tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorAppServicePrivateLinkTests.cs: New App Service scenarios.
  • tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorPrivateLinkTests.cs: Target-output and parameter-name collision coverage.
  • Related Bicep/text snapshots under tests/Aspire.Hosting.Azure.Tests/Snapshots/.

The complete changed-file inventory is preserved in pr-21396-evidence/pr-metadata.json.

Change Categories

  • Azure hosting
  • Tests and snapshots
  • Related integration documentation
  • CLI product changes
  • Dashboard
  • Templates
  • Client/components
  • VS Code extension
  • CI infrastructure

Commands and Environment

The following variables describe the original execution paths. Temporary execution directories are removed after the report is saved; evidence is preserved separately.

$testDir = 'C:\Users\dapine\AppData\Local\Temp\aspire-pr-21396-ee286f38'
$cliPath = "$testDir\dogfood\pr-21396\bin\aspire.exe"
$hivePath = "$testDir\hives\pr-21396\packages"
$version = '17.0.0-pr.21396.g1a495aea'
$appHost = "$testDir\PrivateOriginsSmoke\PrivateOriginsSmoke.AppHost\PrivateOriginsSmoke.AppHost.csproj"

Scenario 1: Exact-head source regression tests

Coverage: Regression, happy path, boundary, and negative.

Result: Passed: 119 succeeded, 0 failed, 0 skipped.

From the exact-head source checkout:

.\restore.cmd
$env:MSBUILDTERMINALLOGGER = 'false'
dotnet test --project tests\Aspire.Hosting.Azure.Tests\Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class '*.AzureFrontDoorTests' --filter-class '*.AzureFrontDoorPrivateLinkTests' --filter-class '*.AzureFrontDoorAppServicePrivateLinkTests' --filter-class '*.AzureEnvironmentResourceTests' --filter-class '*.AzureAppServiceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'

Restore passed with 19 NuGet advisory warnings and no errors. The test command passed. The test run itself took approximately seven seconds, excluding compilation.

The source checkout remained clean after testing: no snapshot drift or modified tracked files.

Evidence: restore.log, focused-tests.log.

Scenario 2: Fresh app and two-origin publishing

Coverage: End-to-end local publishing happy path.

Result: Passed. 12/12 publishing pipeline steps succeeded.

Installed using the PR dogfood script with its documented local-isolation switches:

iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21396 -InstallPath $testDir -SkipExtension -SkipPath"
& $cliPath --version
& $cliPath new aspire-starter --name PrivateOriginsSmoke --output "$testDir\PrivateOriginsSmoke" --source $hivePath --version $version --test-framework None --use-redis-cache false --localhost-tld false --suppress-agent-init --use-config-source false --non-interactive
& $cliPath add Aspire.Hosting.Azure.AppService --version $version --source $hivePath --apphost $appHost --non-interactive
& $cliPath add Aspire.Hosting.Azure.FrontDoor --version $version --source $hivePath --apphost $appHost --non-interactive
& $cliPath publish --apphost $appHost --output-path "$testDir\publish" --non-interactive --include-exception-details

All commands passed. The starter was configured with:

  • One App Service environment, with the separate dashboard disabled.
  • One Front Door connected through WithAzureFrontDoorPrivateLink.
  • Two externally exposed project origins: apiservice and webfrontend.
  • No service-to-service reference, because testing that reference over private networking was outside this scenario.

Publishing used the normal single-environment inference, without explicit WithComputeEnvironment calls. Explicit assignments were added only afterward for the separate read-only preview experiment described below.

Evidence: install.log, version.txt, create.log, add-appservice.log, add-frontdoor.log, publish.log, AppHost.implicit.cs, and the saved AppHost project.

Scenario 3: Generated Bicep compilation and infrastructure assertions

Coverage: Generated artifact shape, validity, and per-origin binding.

Result: Passed: 6/6 Bicep files compiled; 36/36 ARM JSON assertions passed.

Each generated Bicep file was compiled using:

$files = Get-ChildItem "$testDir\publish" -Recurse -Filter *.bicep
foreach ($file in $files)
{
    az bicep build --file $file.FullName --outfile ([IO.Path]::ChangeExtension($file.FullName, '.json'))
}

All six invocations exited 0:

Artifact Result
main.bicep Passed
env-acr/env-acr.bicep Passed
env/env.bicep Passed
frontdoor/frontdoor.bicep Passed
apiservice/apiservice.bicep Passed
webfrontend/webfrontend.bicep Passed

Compiler version: Bicep CLI 0.41.2. Diagnostics included unused-parameter warnings and an available-tool-update notice; no compilation errors.

The saved verify-published.ps1 script checked compiled ARM JSON, including:

  • Exactly one Premium Front Door profile, two origins, and two routes.
  • Distinct website-specific Private Link ID parameters.
  • Both websites set publicNetworkAccess to Disabled.
  • Both origins use the sites group, the correct website host header, and certificate-name validation.
  • Both routes use HttpsOnly forwarding.
  • Both website modules export string resource IDs and locations.
  • main exposes separate website ID and region input parameters and wires them to the correct Front Door parameters.

The script was executed with:

& 'C:\Users\dapine\.copilot\session-state\ee286f38-4ea4-46ad-995a-515406c834ea\files\verify-published.ps1' -PublishPath "$testDir\publish"

Evidence: infrastructure-assertions.log, publish/**/*.bicep, corresponding ARM JSON, and per-file .build.log files.

Scenario 4: Boundary behavior

Coverage: Focused source tests, not separate live deployments.

Result: Passed as part of the 119-test run.

Case Expected outcome
Register connection before or after origins Equivalent website-specific target configuration
Existing App Service plan Private websites can be generated without modifying the existing plan
Literal and parameterized deployment slots Production-site target output; slot public access disabled
Mixed App Service and Container Apps environments Website-specific versus environment-shared targets remain separate
Workload not registered as an origin Public access still disabled in the opted-in environment
Multiple outputs from one target and fallback-name collisions Distinct provisioning parameter bindings
Normal run mode Private Link provisioning annotations are not applied

Snapshots validate generated infrastructure. These results do not prove that an existing public production site is retroactively restricted; the PR explicitly documents that caveat.

Evidence: focused-tests.log and the clean exact-head source test run.

Scenario 5: Negative behavior

Coverage: Focused source tests.

Result: Passed as part of the 119-test run.

Case Expected safe outcome
An unconnected Front Door points to a private App Service workload Clear InvalidOperationException naming the affected origin/Front Door
A Private Link connection has no origins in its environment Clear rejection explaining that none of the origins use the environment

Evidence: focused-tests.log; corresponding tests are UnconnectedFrontDoorCannotReachPrivateWebsites and UnusedConnectionIsRejected.

Additional Read-Only Deployment Preview Experiment

Status: Limitation observed; actual deployment ordering remains unvalidated.

No deployment was executed. Only --list-steps was used:

& $cliPath deploy --apphost $appHost --list-steps --non-interactive

With ordinary single-environment inference, this exited 6:

Resource 'apiservice' does not have a compute environment. Ensure a compute environment
(e.g., Azure Container Apps, Azure App Service) is configured in the application model.

A fresh aspire-empty control app was generated using the same PR version:

& $cliPath new aspire-empty --name PublicOriginsControl --output "$testDir\PublicOriginsControl" --source $hivePath --version $version --localhost-tld false --suppress-agent-init --use-config-source false --non-interactive

This template produces a file-based apphost.cs, not an AppHost project subdirectory. An initial aspire add call using the assumed project subdirectory exited 7; using the actual apphost.cs succeeded.

The control's results:

Model Read-only preview result
App Service with a project and no Front Door Passed
App Service with a public Front Door origin, no Private Link Same missing-compute-environment error, exit 6
Two private origins with explicit .WithComputeEnvironment(environment) Passed, exit 0

The public control reproduces the error without enabling Private Link, so it is not evidence that the new opt-in alone causes it. A pre-PR binary baseline was not run; this report does not claim the error is proven pre-existing.

The successful explicit-binding preview lists 13 steps but does not materialize website deployment steps. --list-steps skips lifecycle processing, so it cannot establish that real provisioning waits for both websites before Front Door. The successful publish and source tests do not substitute for a live deployment-order check.

Evidence: deployment-steps.log, control-deployment-steps.log, control-frontdoor-deployment-steps.log, explicit-deployment-steps.log, AppHost.explicit.cs, and control-apphost.cs.

Summary

Scenario Status Notes
Exact artifact/source identity Passed CLI short SHA and full source SHA match PR head
Focused Azure regression tests Passed 119 succeeded; no skipped tests or snapshot drift
Fresh app and two-origin publishing Passed 12/12 pipeline steps
Bicep compilation Passed 6/6 generated files
Infrastructure assertions Passed 36/36 assertions
Boundary and negative coverage Passed Included in focused tests
Additional deployment preview Limited Public Front Door control reproduces implicit-binding error
Live Azure provisioning, approval, routing, and ordering Not run Outside approved scope

Overall Result

Approved offline scenarios passed. No new regression was established within that scope.

This is not full live-Azure verification. Website-before-Front-Door deployment ordering, managed private endpoint creation/approval, direct-site denial, Front Door connectivity, slot swapping, and service-to-service private networking remain unvalidated in this run.

The additional deploy --list-steps limitation is documented with a public-origin control rather than dismissed as unrelated.

Artifacts and Cleanup

  • Report: C:\Users\dapine\.copilot\session-state\ee286f38-4ea4-46ad-995a-515406c834ea\files\pr-21396-testing-report.md
  • Evidence: C:\Users\dapine\.copilot\session-state\ee286f38-4ea4-46ad-995a-515406c834ea\files\pr-21396-evidence
  • Assertion script: C:\Users\dapine\.copilot\session-state\ee286f38-4ea4-46ad-995a-515406c834ea\files\verify-published.ps1
  • Logs, CLI diagnostics, both source fixture variants, generated Bicep, and compiled ARM JSON are preserved.
  • No screenshots were needed: no dashboard UI changed and no live dashboard scenario was run.
  • No Azure resources were created, modified, or deleted.
  • Temporary installation and generated apps were removed after evidence preservation.
  • Git removed the temporary worktree registration but failed to delete its source directory with Invalid argument. Residual source/build files remain at E:\GitHub\copilot-worktrees\aspire\ievangelist-pr21396-source; cleanup is partial.
  • The current session worktree remained unchanged.
  • PR comment posting requires explicit user confirmation.

@eerhardt
Eric Erhardt (eerhardt) merged commit 968a255 into main Nov 5, 2026
256 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 5, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #2062

Generated by PR Documentation Check · copilot · auto · 28.8 AIC · ⌖ 1.18 AIC · ⊞ 7.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

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

Added a "Private Link origins for Azure App Service" section to azure-front-door.mdx. Triggered signals: integration_readme_changed (App Service and Front Door READMEs), pr_body_has_cli_flag_mention (az network private-endpoint-connection list --type Microsoft.Web/sites), pr_body_has_user_facing_section (WithAzureFrontDoorPrivateLink usage).

Note

This draft PR needs human review before merging.

Eric Erhardt (eerhardt) added a commit to microsoft/aspire.dev that referenced this pull request Nov 11, 2026
…App Service (#2084)

## Summary

Documents `WithAzureFrontDoorPrivateLink`
(`withAzureFrontDoorPrivateLink` in TypeScript) for Azure Container Apps
and Azure App Service in Aspire 17.0. This consolidates the two bot
drafts, #1965 (Container Apps) and #2062 (App Service), into one set of
docs and supersedes both. The source changes are microsoft/aspire#21228
and microsoft/aspire#21396, and the final code and README on
`release/17.0` are identical to `main` for the affected files.

What changed:

- `azure-front-door.mdx`: new **Private Link origins** section with
requirements and SKU constraints, a complete TypeScript and C# example
for each target, what Aspire provisions (with a generated Bicep
excerpt), App Service publish/deploy behavior, deployment slots,
existing sites, service-to-service limits, connection approval commands
for both targets, the private endpoint region mapping and override
(TypeScript and C#), and a troubleshooting table. The frontmatter
description now mentions private origins.
- Short cross-links from the App Service host page, the Configure
Container Apps page, the two Azure deployment pages, and the Azure
security best practices page. The security page no longer says App
Service can only be a public website model.
- `ASPIREAZURE003` diagnostic page: notes that
`WithAzureFrontDoorPrivateLink` reports the diagnostic and adds an
example.

Decisions and assumptions:

- Examples use `AddDotnetProject` / `addDotnetProject`, because
`AddProject` is marked obsolete on `release/17.0`. The new section notes
the `Aspire.Hosting.Dotnet` package requirement.
- The TypeScript App Service example uses `withDashboard({ enable: false
})`. The `withDashboard(false)` form in the source PR description is a
type error against the generated SDK. Existing pages
(`deployment/azure/app-service.mdx`,
`deployment/azure/container-apps.mdx`) still show
`withDashboard(false)`; I left those alone because they are unrelated to
this change.
- The region override sets a literal region in both languages. The C#
parameter-based variant from the Front Door README was left out to keep
the TypeScript and C# samples equivalent. TypeScript needs the opt-in,
experimental `Aspire.Hosting.Azure.Provisioning.Cdn` package.
- App Service plan tiers that support private endpoints come from Azure
docs, not from the source PRs. The default Aspire plan (`P0V3`)
qualifies.
- No `ApiReference` links for the new APIs, because the generated API
data in this repo (13.6) does not contain them yet.
- Did not edit the 17.0 what's-new page, per the task scope.

Not verified and flagged in the docs where relevant:

- Same-environment Container Apps calls when public network access is
disabled. The source PR says this was not verified against a deployed
environment, so the docs tell readers to verify after the first
deployment.
- An end-to-end Container Apps deployment. Source PR #21396 deployed App
Service end to end (27 steps, direct URL returned 403, Front Door
returned 200). Source PR #21228 did not run an end-to-end deployment.

## Third-party links and affiliations

None. The added links point to Microsoft Learn and to NuGet.org package
pages for Aspire packages.

## Validation

- `pnpm install --frozen-lockfile` (from `src/frontend`): passed.
- `pnpm exec vitest run --config vitest.config.ts
tests/unit/seo-lengths.vitest.test.ts
tests/unit/api-reference-components.vitest.test.ts
tests/unit/typescript-first-apphost-tabs.vitest.test.ts`: passed (3
files, 8 tests).
- `pnpm test:unit:twoslash-blocks`: passed (2 tests). No new `twoslash`
fences were added.
- `pnpm dev`, then requesting all 7 edited pages: all returned HTTP 200
with no error overlay. Checked the rendered tabs, code blocks, and
troubleshooting table with `playwright-cli`.
- TypeScript samples: type-checked with `tsc` against the SDK generated
by `aspire add` for `17.1.0-preview.1.26556.5` (Front Door, Container
Apps, App Service, Dotnet, and Provisioning.Cdn packages). Passed.
`withAzureFrontDoorPrivateLink` is present on both
`AzureContainerAppEnvironmentResource` and
`AzureAppServiceEnvironmentResource`, and on `17.0.0-preview.1.26552.6`
for Container Apps.
- C# samples: `dotnet build apphost.cs` with the same packages: passed
with no warnings. Removing the `#pragma` produced error
`ASPIREAZURE003`.
- `aspire publish` for the TypeScript Container Apps sample (with the
region override) and the App Service sample: both succeeded. The
generated Bicep confirmed the `Premium_AzureFrontDoor` SKU,
`publicNetworkAccess: 'Disabled'`, `managedEnvironments` and `sites`
group IDs, the request message, `privateLinkLocation: 'westus2'`, and
the `<name>_website_resourceId_input` parameters in `main.bicep`.
- Not run: `pnpm build` (CI does this per repo policy) and an end-to-end
Azure deployment.

---------

Co-authored-by: Copilot App <[email protected]>
Adam Ratzman (adamint) added a commit that referenced this pull request Nov 25, 2026
#21457 added snapshots that predate the resourceId and resourceLocation outputs from #21396.

Co-authored-by: Copilot App <[email protected]>
Adam Ratzman (adamint) added a commit that referenced this pull request Nov 25, 2026
<!-- copilot-assessment:v1 -->
### Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: `a4a7fdc6e14c767da40d1a8cac4598d40a29ed78`

| Dimension | Assessment | Rationale |
|---|---|---|
| Change confidence | 8.5/10 | ↑ All 14 image-build harness scenarios
pass on Linux (node 24), including new pre-deadline and cleanup
Docker/plugin 255 cases, which fail without the fix.<br>↑
DcpConnectionHealthCheckTests builds; the repaired test passes
locally.<br>↑ All 61 AzureAppServiceTests pass locally with updated
snapshots.<br>↓ Two DcpConnectionHealthCheckTests string assertions fail
locally only due to a Spanish UI culture.<br>↓ Post-push CI not yet
inspected at time of assessment. |
| Diagnosis confidence | 9/10 | ↑ docker/cli v28.0.4 propagates
WaitStatus.ExitStatus() (-1 for signaled plugins, exit 255).<br>↑ CI log
shows CS7036 at DcpConnectionHealthCheckTests.cs:208-209 matching the
#22553 signatures. |
| Evidence fit | 8.5/10 | ↑ Regression reproduces the reviewer's
fallback-and-exit-0 symptom.<br>↓ Not validated against a real Buildx
plugin kill. |
<!-- /copilot-assessment -->
## Description

Shared CLI E2E image builds can exhaust their 45-minute job downloading
from a throttled Azure Ubuntu apt mirror without reaching the existing
error-only fallback. Bound primary attempts so default-source fallback
also runs for slow or stalled builds.

Independent fix based on `main`; relates to #21828, which is unchanged
and is not a dependency. No auto-merge or bypass requested.

- Share orchestration across the reusable image workflow and cache
warmer. Apply a five-minute primary limit to .NET, polyglot base, Java
and Go. Four primary attempts plus four 30-second cleanup grace periods
leave 23 minutes within the unchanged 45-minute cap for fallback, setup
and artifact handling.
- TERM the client's process group so Docker can cancel its BuildKit
session. Retry exactly once after ordinary failure or deadline,
preserving both attempts' output and fallback status. A dependency-free
Node supervisor tracks deadline and external signals independently,
including cancellation during cleanup. External cancellation and forced
kills, including an independently killed client, fail without fallback.
- Preserve original Ubuntu apt sources and restore them for empty mirror
arguments, including inherited Java/Go layers. Leave third-party sources
untouched.
- Add behavioral regressions, test-selection routes, cache-warmer
filters and docs. No action pins, package manifests or product code
changed.
- Treat Docker exit 255 (a CLI plugin such as Buildx killed by a signal)
as unconfirmed cancellation, before or during deadline cleanup, so it
fails without fallback.
- Fix the `main` build break in
`tests/Aspire.Cli.Tests/Utils/DcpConnectionHealthCheckTests.cs`: the
test added by #21919 used the pre-#22553 `CertificateManager.Create` and
`DcpConnectionChecker` signatures (CS7036). It now passes
`TemporaryStorage` like neighboring tests.
- Fix the `main` test break in
`AzureAppServiceTests.UserDefinedSlotConfigNames_AreMergedWithGeneratedStickySettings`:
the snapshots from #21457 predate the `resourceId`/`resourceLocation`
outputs added by #21396.

### Two-attempt root-cause evidence

Both jobs ran at #21828 head `1ab3ad1e302a110bdb4f69ad4e3ee2e05d646d9a`
in [run
42151619597](https://github.com/microsoft/aspire/actions/runs/42151619597).
Both have annotation `The job has exceeded the maximum execution time of
45m0s`.

| Attempt | Image job | Started / completed (UTC, November 6) | Exact
apt log |
| --- | --- | --- | --- |
| 1 |
[127676748230](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127676748230)
| 02:41:00 / 03:26:22 | `#11 2272.6 Fetched 82.4 MB in 37min 49s (36.3
kB/s)` |
| 2 |
[127692798471](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127692798471)
| 03:29:03 / 04:14:24 | `#11 2492.6 Fetched 108 MB in 41min 29s (43.4
kB/s)` |

Attempt 2 then downloaded from HTTPS GitHub at `#11 2497.2 Fetched 15.1
MB in 0s (80.1 MB/s)`, while another mirror download logged `#15 92.37
Fetched 4031 kB in 1min 29s (45.4 kB/s)`. Both also reported GHA
cache-import HTTP 400, `Our services aren't available right now`. Cold
apt downloads, not product tests, consumed the image job. Neither
attempt reached product-test execution using these images. No third
rerun was triggered.

### Local validation

`.\restore.cmd`: passed, 0 errors and 18 dependency-advisory warnings.

Original selector coverage passed across appropriate hosts: 299 Windows
managed cases, 2 Windows native MSBuild graph cases and 79 Linux
shell/Git cases:

```powershell
dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-namespace "Infrastructure.Tests.TestTriggerMap" --filter-not-class "*.PrComparisonBaseTests" --filter-not-class "*.SelectTestsCliTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
# Passed: 299

dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-method "*.NativeDashboardSharedHelpersSelectNativeValidationInEnforceMode" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
# Passed: 2

dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-class "*.TestTriggerMapTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
# Passed: 179 after the final routing change

dotnet run --project tools\SelectTests -- --changed-files <generated-changed-files.txt> --explain
# Passed: production graph/prefilter, 0 unattributed inputs.
# Shared Docker shell helper correctly activates the existing ALL route.
```

Linux container, pinned .NET runtime, same built MTP assembly:

```bash
/tmp/dotnet/dotnet /repo/artifacts/bin/Infrastructure.Tests/Debug/net11.0/Infrastructure.Tests.dll --filter-class "*.PrComparisonBaseTests" --filter-class "*.CliE2EImageBuildTests" --filter-class "*.SelectTestsCliTests" --filter-not-method "*.NativeDashboardSharedHelpersSelectNativeValidationInEnforceMode" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" --results-directory /tmp/test-results
# Original implementation: passed 88 (79 selector + 9 image cases).

/tmp/dotnet/dotnet artifacts/bin/Infrastructure.Tests/Debug/net11.0/Infrastructure.Tests.dll --filter-class "*.CliE2EImageBuildTests" --filter-not-trait quarantined=true --filter-not-trait outerloop=true
# Final b8274fc: passed all 13 expanded image cases.
```

The initial Windows run failed in 17 shell cases because it selected the
broken System32 WSL bash shim, and 5 existing Git-fixture cleanup cases
with `UnauthorizedAccessException`. The same cases passed on Linux. The
2 native graph cases passed on Windows; running the Windows SDK on Linux
caused `BadImageFormatException`. Passing partitions cover every focused
case without modifying unrelated tests.

The 13 image cases cover success, ordinary failure, fallback failure,
slow success, stall, forced kill, client cancellation, external
cancellation before/during deadline cleanup, client SIGKILL during
cleanup, all-image/.NET-only orchestration, and exact original
apt-source restoration in real Ubuntu. Cleanup cancellation reproduces
on 4bb054c as incorrect exit 0 plus fallback; the corrected supervisor
exits 143 without fallback. Killed clients retain 137, never deadline
124.

Real Docker/Buildx probe re-run after the supervisor change:

```bash
build_with_mirror_retry 20s "real BuildKit cancellation probe" docker buildx build --progress plain --load -t mirror-fallback-probe
```

Passed: primary printed `PRIMARY_RUNNING`, then `#5 CANCELED` /
`Canceled: context canceled`; fallback printed `FALLBACK_RUNNING` and
loaded the image. BuildKit history recorded primary `Error` and fallback
`Completed`. Process inspection before fallback and afterwards found
only the BuildKit daemon, no surviving primary `RUN`/`sleep`. Temporary
builder and image removed. `git diff --check`: passed.

### Actual final-head CI

Head **b8274fc8e0377c70ada8aa9eecfbdbc4069c6ff7**, [run
42170803717](https://github.com/microsoft/aspire/actions/runs/42170803717):
**image build and all four uploads passed; Infrastructure passed
2090/2090; all 116 selected CLI archive E2E jobs passed.** The
downloaded Infrastructure TRX confirms all 13 new image cases passed.
CLI unit tests passed on Linux, macOS and Windows. This is actual
final-head evidence, not evidence from superseded runs.

[Image job
127739541935](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127739541935)
ran 05:56:03–06:05:32 UTC. All four artifacts are present and unexpired:

| Variant | Artifact ID | Size (bytes) | Uploaded UTC |
| --- | --- | --- | --- |
| .NET | 13481517063 | 696399767 | 06:04:42 |
| Polyglot | 13480867983 | 391644472 | 06:04:54 |
| Java | 13481671757 | 654944092 | 06:05:13 |
| Go | 13481043964 | 583388699 | 06:05:30 |

The primary mirror was healthy: `#11 4.388 Fetched 108 MB in 1s (114
MB/s)`. **No actual CI timeout/fallback occurred**; fallback evidence is
deterministic/local BuildKit evidence, not a production CI claim.

Representative actual consumers confirm all four artifacts load and
execute tests:

| Consumer job | Images loaded | Test outcome |
| --- | --- | --- |
| [Go starter
127743182589](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127743182589)
| .NET, polyglot, Go | 1 passed, 1 skipped |
| [Java polyglot
127743185239](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127743185239)
| .NET, polyglot, Java | 1 passed |
| [.NET smoke
127743188570](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127743188570)
| .NET, polyglot | 10 passed |

**Required checks are not green; approval is still required.** Two
failures outside the changed image infrastructure remain, with
same-source main controls rather than blind reruns:

- [Windows extension units
127739542026](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127739542026):
4150 passed, 9 pending, 1 failed. `rejects when a POSIX process group
remains alive after forced termination` passed its rejection/listener
assertions but saw global fake-timer count 2 instead of 0. Test and
process-helper blobs are identical to main 54b4929. [Main control
127718292677](https://github.com/microsoft/aspire/actions/runs/42164303520/job/127718292677)
passed that exact case and all 4151 tests. The source of the two timers
is not established; no extension edit or retry made.
- [Windows Hosting-2
127739572340](https://github.com/microsoft/aspire/actions/runs/42170803717/job/127739572340):
`ExecutableDoesNotExist` and `ExecutableWorkingDirectoryDoesNotExist`
failed before scenario assertions because DCP's `docker.exe --version`
dependency probe timed out. Test file and entire DCP source tree are
identical to main 54b4929. [Main control
127718297752](https://github.com/microsoft/aspire/actions/runs/42164303520/job/127718297752)
TRX passed the same cases in 6.005s and 2.854s. No product edit or retry
made.

All four review threads have been addressed. No merge or bypass
performed; #21828 remains untouched and cannot consume this fix until
integration.

### Security considerations

The supervisor executes existing checked-in Docker commands, not new
untrusted input. Separate-session process-group signaling avoids
signaling the workflow shell and permits child cleanup. A forced kill
cannot confirm remote BuildKit cancellation, so it fails closed without
fallback. No threat model or separate security review has been
performed.

Fixes # (issue)

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] 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
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [x] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [x] No
  - [ ] No

---------

Co-authored-by: IEvangelist <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Adam Ratzman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants