Repository navigation
Add experimental Azure Container Apps Express support - #20115
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20115Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20115" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
One or more issues must be addressed before approval.
Pull request overview
Adds opt-in experimental Azure Container Apps Express support while preserving standard ACA behavior.
Changes:
- Adds C# and TypeScript
AsExpress()APIs and generated bindings. - Adds Express-specific provisioning defaults and FQDN-based deployment dependencies.
- Adds unit, snapshot, and deployment E2E coverage.
File summaries
| File | Description |
|---|---|
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AzureContainerAppExpressGeneratedAspire.verified.ts | Updated as part of this pull request. |
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureDeployerTests.DeployAsync_WithExpressPublicReferences_UsesActualFqdnsAndDependencyOrder_existing=True.verified.txt | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureDeployerTests.DeployAsync_WithExpressPublicReferences_UsesActualFqdnsAndDependencyOrder_existing=False.verified.txt | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPublishesEnvironment_existing=True.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPublishesEnvironment_existing=True.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPublishesEnvironment_existing=False.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPublishesEnvironment_existing=False.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressProjectPreservesExplicitReplicaSettings_replicas=null_customMinimum=null.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressProjectPreservesExplicitReplicaSettings_replicas=null_customMinimum=null.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressProjectPreservesExplicitReplicaSettings_replicas=3_customMinimum=null.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressProjectPreservesExplicitReplicaSettings_replicas=3_customMinimum=null.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressProjectPreservesExplicitReplicaSettings_replicas=3_customMinimum=2.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressProjectPreservesExplicitReplicaSettings_replicas=3_customMinimum=2.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesParameterizedSettingsAndDisabledFeatures.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesManualSecretsIdentityAndSupportedCustomization.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesManualSecretsIdentityAndSupportedCustomization.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesKeyVaultSecretReferences.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesExplicitDashboardRegardlessOfCallOrder_expressFirst=True.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesExplicitDashboardRegardlessOfCallOrder_expressFirst=False.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressPreservesEnvironmentCustomization.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressDefaultsAreEnvironmentLocal#standard.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressTests.AsExpressDefaultsAreEnvironmentLocal.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.PublicReferencesUseIngressFqdnAndPreserveSelfTargetPort#api.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.PublicReferencesUseIngressFqdnAndPreserveSelfTargetPort.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.PublicReferencesUseIngressFqdnAndPreserveSelfTargetPort.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.OnlyExpressConsumersRejectPreservedHttpFromStandardEndpoints_expressConsumer=False.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.OnlyExpressConsumersRejectPreservedHttpFromStandardEndpoints_expressConsumer=False.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.ExpressConsumerUsesPublicStandardEndpoints.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.ExpressConsumerUsesPublicStandardEndpoints.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.DeploymentSummaryUsesActualFqdnWithoutEnvironmentDomainOrDashboard.verified.txt | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.CrossEnvironmentReferencesRequireNativeDeployment_expressConsumer=True.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.CrossEnvironmentReferencesRequireNativeDeployment_expressConsumer=True.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.CrossEnvironmentReferencesRequireNativeDeployment_expressConsumer=False.verified.json | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppExpressEndpointTests.CrossEnvironmentReferencesRequireNativeDeployment_expressConsumer=False.verified.bicep | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/AzureContainerAppExpressTests.cs | Updated as part of this pull request. |
| tests/Aspire.Hosting.Azure.Tests/AzureContainerAppExpressEndpointTests.cs | Updated as part of this pull request. |
| tests/Aspire.Deployment.EndToEnd.Tests/AcaExpressDeploymentTests.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure/AzurePublishingContext.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/README.md | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/ContainerAppEnvironmentContext.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/BaseContainerAppContext.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppResource.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExpressSupport.cs | Updated as part of this pull request. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs | Updated as part of this pull request. |
Review details
Suppressed comments (4)
src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs:415
- This method also serves standard Container Apps, whose
ContainerAppContextsupports non-HTTP TCP endpoints as additional ports (ContainerAppContext.cs:271-284). The unconditionalhttps/443fallback here makesGetEndpointPropertyExpressionreport the wrong scheme and port for those endpoints, so a standard TCP reference no longer matches the published binding. Restrict the HTTPS normalization to HTTP/HTTP2 transports and preserve the declared TCP scheme and exposed port.
var scheme = PreserveHttpEndpoints ? endpoint.UriScheme : "https";
var port = string.Equals(scheme, "http", StringComparison.OrdinalIgnoreCase) ? 80 : 443;
var tlsEnabled = string.Equals(scheme, "https", StringComparison.OrdinalIgnoreCase) || endpoint.TlsEnabled;
src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs:110
AddIngressreturns without assigningConfiguration.Ingresswhen the resource has no HTTP or additional ports, so this unconditional access throws aNullReferenceExceptionwhile generating an Express app with no ingress. Guard the output on a non-null ingress (or report a deliberate unsupported-application error) instead of failing during Bicep generation.
Value = containerAppResource.Configuration.Ingress.Fqdn
src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs:251
- With
AsExpress().WithHttpsUpgrade(false), the scheme selected above remainshttp, but this newIsExpress ||branch reports TLS as enabled and the generated public URL/reference is stillhttp://.... Express does not support insecure HTTP ingress, so this combination can produce invalid/inconsistent bindings; reject the incompatible override or make Express consistently emit HTTPS, including inGetEndpointPropertyExpression.
_containerAppEnvironmentContext.Environment.IsExpress || endpoint.TlsEnabled);
tests/Aspire.Deployment.EndToEnd.Tests/AcaExpressDeploymentTests.cs:111
- This live redeployment assertion changes only the API image. The PR description identifies a separate configuration-only update as still failing, so this is not coverage for the other redeployment path that can regress FQDN output propagation and consumer bindings. Add a deterministic configuration-only change and verify its effect through the frontend, or keep the Express deployment scenario blocked until that path is fixed and covered.
await DeployAsync(auto, counter, "updated-deployment.txt", clearCache: false);
- Files reviewed: 48/48 changed files
- Comments generated: 0
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Two critical HTTPS-handling findings and one moderate Express job-target validation finding remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
src/Aspire.Hosting.Azure.AppContainers/ContainerAppEnvironmentContext.cs:92
- Azure Container Apps Express does not support Container Apps Jobs, but this branch is selected for every resource in the environment, including resources with
AzureContainerAppJobCustomizationAnnotation. A.PublishAsAzureContainerAppJob()therefore emits a job deployment target pointing at an Express environment and only fails later during Azure validation. Reject job-targeted resources during Express preparation (with actionable guidance to use a standard environment) or otherwise prevent them from being assigned to Express.
var provisioningResource = Environment.IsExpress
? Environment.GetOrCreateExpressContainerAppResource(resource)
: new AzureContainerAppResource(resource.Name + "-containerapp", context.BuildContainerApp, resource);
- Files reviewed: 48/48 changed files
- Comments generated: 2
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
Eric Erhardt (eerhardt)
left a comment
There was a problem hiding this comment.
Review of the experimental ACA Express support. Verified the production diff against surrounding code, existing standard-ACA snapshots, and the new tests.
Findings: 1 bug, 1 test-coverage gap, 1 low-severity inconsistency.
Not flagged: the generated TypeScript has no @experimental marker (the ATS generator has no experimental concept at all, so that's a framework-wide gap, not something this PR introduces), and WithDashboard(true) being honored under Express (deliberate — Azure validates service compatibility).
Also verified clean: no api/*.cs, NuGet.config, global.json, or .xlf edits; no == null; deployment-tests.yml auto-enumerates test classes via .github/actions/enumerate-tests, so AcaExpressDeploymentTests is picked up without a test-trigger-map.yml change; and the new AzurePublishingContext guard strictly improves a path that previously threw a bare KeyNotFoundException.
There was a problem hiding this comment.
🔵 Needs a closer look
Four unresolved moderate review findings remain in Express validation, ingress handling, job support, and E2E secret coverage.
Review details
Suppressed comments (4)
Previously missed (1) — in code that hasn't changed since the last review.
src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs:112
AddIngressleavesConfiguration.Ingressnull when an app has no endpoints, but every regular container app in an Express environment dereferencesConfiguration.Ingress.Fqdnhere. Consequently, adding a worker/container without an HTTP endpoint to an Express environment fails target generation with aNullReferenceException; only emit this output when ingress exists, since it is needed only for public endpoint references.
src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs:130
- This Express branch only changes the resource API version; endpoint processing still accepts internal TCP and HTTP/2 endpoints and
AddIngressemits them unchanged. Express does not support TCP ingress, additional ingress ports, or HTTP/2, soWithHttp2Endpointor an internal TCP endpoint underAsExpress()produces an invalid deployment that is discovered only by Azure. Add Express-specific validation before generating the ingress.
if (_containerAppEnvironmentContext.Environment.IsExpress)
{
containerApp.ResourceVersion = AzureContainerAppExpressSupport.ResourceVersion;
src/Aspire.Hosting.Azure.AppContainers/ContainerAppEnvironmentContext.cs:92
AsExpress()is applied to every compute resource here, including resources thatCreateContainerAppContextmaps toContainerAppJobContext. Azure Container Apps Express does not support Container Apps Jobs, so an AppHost that publishes a job under this environment generates a job module and only fails at provider validation. Reject job targets during Express validation with guidance to use a standard ACA environment instead.
var provisioningResource = Environment.IsExpress
? Environment.GetOrCreateExpressContainerAppResource(resource)
: new AzureContainerAppResource(resource.Name + "-containerapp", context.BuildContainerApp, resource);
tests/Aspire.Deployment.EndToEnd.Tests/AcaExpressDeploymentTests.cs:376
- Please also send a request with a non-empty but incorrect
X-Express-Test-Secretbefore returning. This currently verifies only an absent header, so the E2E test would not catch a regression that accepts wrong credentials despite the PR's stated wrong-secret validation.
using var unauthenticated = await client.GetAsync(urls["api"], readiness.Token);
Assert.Equal(HttpStatusCode.Unauthorized, unauthenticated.StatusCode);
- Files reviewed: 48/48 changed files
- Comments generated: 0 new
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate findings remain in endpoint naming, transport validation, and secret-validation coverage.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs:402
- This normalizes every cross-environment endpoint to HTTP/HTTPS ports, even when the endpoint is TCP or an additional non-HTTP port. A standard ACA resource using a TCP endpoint across environments will therefore receive
https/443 (or 443 forPort) instead of its configured scheme and port, while same-environment mappings preserve those values. Restrict the HTTPS/80/443 normalization to HTTP/HTTP2 ingress endpoints and retain the endpoint's configured scheme/port for other transports.
var scheme = PreserveHttpEndpoints ? endpoint.UriScheme : "https";
var port = string.Equals(scheme, "http", StringComparison.OrdinalIgnoreCase) ? 80 : 443;
var tlsEnabled = string.Equals(scheme, "https", StringComparison.OrdinalIgnoreCase) || endpoint.TlsEnabled;
src/Aspire.Hosting.Azure.AppContainers/README.md:55
- This behavior conflicts with the PR description's security statement that both the frontend and referenced API must be explicitly exposed:
PublicReferencesUseEnvironmentDomainAndPreserveSelfTargetPortdeliberately uses an internal-only consumer, so this validation only requires the referenced endpoint to be public. Azure Express supports internal ingress, so either correct the PR description to state that only referenced endpoints must be public, or enforce the stronger requirement consistently.
Opt in on the existing environment builder. Public app-to-app references require an explicit public endpoint on the **referenced API**, not just the frontend:
tests/Aspire.Deployment.EndToEnd.Tests/AcaExpressDeploymentTests.cs:376
- The live test claims to validate 401 responses for both missing and wrong secrets, but this request only omits the header. A regression that accepts any non-empty secret would still pass; add a second request with
X-Express-Test-Secretset to an incorrect value and assertUnauthorized.
using var unauthenticated = await client.GetAsync(urls["api"], readiness.Token);
Assert.Equal(HttpStatusCode.Unauthorized, unauthenticated.StatusCode);
- Files reviewed: 51/51 changed files
- Comments generated: 2
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
Update the TypeScript metadata test and clarify the documented endpoint contract.
Review details
Suppressed comments (2)
src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs:1031
- This public documentation overstates the Express reference contract: the implementation and
ExpressConsumerUsesPublicStandardEndpointstest allow an Express consumer with onlyWithHttpEndpoint()(noWithExternalHttpEndpoints()) to call a public endpoint, and cross-environment references preserve a standard producer'shttpscheme. Please document that the referenced endpoint must be public, and that HTTPS/scheme preservation depends on the producing environment.
/// App-to-app references require explicitly public HTTP endpoints and use their HTTPS URLs.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs:1667
AsExpressis marked[Experimental("ASPIREACAEXPRESS001")], but this test only checks that the capability and method are emitted. It would still pass if the scanner dropped the experimental flag, leaving TypeScript consumers without the expected@experimentalmetadata for this opt-in API; assertcapability.IsExperimental(and the generated marker if desired) here.
- Files reviewed: 36/36 changed files
- Comments generated: 0 new
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
Mitch Denny (mitchdenny)
left a comment
There was a problem hiding this comment.
Approved, with one potential cross-provider endpoint-resolution issue noted inline for follow-up.
Fix a problem when referencing across environments. Check for cross environment first before validating the endpoint reference for the current environment.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Cross-environment Express consumers can bypass private-endpoint validation; documentation and test coverage follow-ups also remain.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs:1673
- This test only checks scanner metadata and a generated declaration; it does not invoke
asExpress()through the generated TypeScript/ATS RPC path. The existing TypeScript deployment scenario also adds a standard environment without this call, so a dispatch/projection regression could leave TypeScript users unable to select Express while these assertions still pass. Add a focused TypeScript AppHost/dispatch test (or extend the existing TypeScript deployment scenario) that calls.asExpress()and verifies the Express environment output.
- Files reviewed: 39/41 changed files
- Comments generated: 3
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Clarified app-to-app reference requirements and HTTPS usage. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
Public endpoint guidance, TypeScript activation coverage, and integration documentation need updates.
Review details
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs:1673
- This only checks that the generator emits a declaration; no TypeScript AppHost in
tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/TypeScript/apphost.mtsinvokesasExpress(). An RPC/export-dispatch regression could therefore leave this assertion green while TypeScript users cannot activate Express. Add the call to the existing TypeScript AppHost and exercise the generated path.
src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs:1024 - Because this adds a new exported deployment mode, the integration README is now materially incomplete: it documents only the standard environment and does not show
.AsExpress()for C# or TypeScript or the public-HTTPS, experimental/default behavior described here. Please add an Express section covering usage, access/security, publish/deploy behavior, and known limitations instead of leaving that guidance only in the PR description.
tests/Aspire.Hosting.Azure.Tests/AzureContainerAppExpressEndpointTests.cs:35
- This test deliberately leaves
webwithoutWithExternalHttpEndpoints()while still resolving its reference to the publicapi. That contradicts the PR's security section, which says both the referencing and referenced apps must be explicitly exposed; either enforce that stronger rule or correct the guidance to say only the producer endpoint must be public.
var web = builder.AddProject("web", "web.csproj", options => options.ExcludeLaunchProfile = true)
.WithHttpEndpoint()
.WithReference(api);
- Files reviewed: 39/41 changed files
- Comments generated: 0 new
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Tests selector8 / 99 PR test projects · 2 PR jobs, from 43 changed files. Selected PR test projects (8 / 99)
Selected PR jobs (2)
How these were chosen — grouped by what changed🔧 🧪 🔧 🔧 🔧 🔧 🔧 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🔵 Needs a closer look
A moderate TypeScript fixture-coverage change remains, and the experimental Azure deployment changes warrant human review.
Review details
Suppressed comments (1)
src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs:1043
- This adds a new exported TypeScript capability, but the new assertion only checks that a method declaration string is emitted. The checked-in AppContainers polyglot fixtures do not call
asExpress(), so the polyglot validation job cannot catch a generated-SDK dispatch or fluent-chain problem in the advertised TypeScript usage. Add the call to the relevanttests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/*fixtures (at least TypeScript) so the existing validation exercises the export end to end.
[AspireExport]
[Experimental("ASPIREACAEXPRESS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<AzureContainerAppEnvironmentResource> AsExpress(this IResourceBuilder<AzureContainerAppEnvironmentResource> builder)
- Files reviewed: 39/41 changed files
- Comments generated: 0 new
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests. Suspected flaky test(s):
Suggested actions:
You can re-run the failed jobs from the workflow run page. |
|
✅ No documentation update needed. Step 5 branch taken: Triggered signals (2): Both signals fired because this PR adds the
(summary truncated) |
Description
Add experimental, opt-in Azure Container Apps Express deployment support for HTTP applications, without replacing the existing Container Apps environment API.
Users select
.AsExpress()on an environment in C# or TypeScript. Express is emitted asproperties.environmentMode: "Express"onMicrosoft.App/managedEnvironments— it is not a separate Aspire environment type, package, publisher, or CLI command. Environments without.AsExpress()keep their existing behavior and generated artifacts, and localaspire runorchestration is unchanged.Express defaults to zero minimum replicas and omits the implicit Consumption workload profile, managed Aspire dashboard, and .NET platform data-protection configuration. Explicit customization is preserved and passed to Azure to validate; Aspire does not maintain an Express service-capability matrix.
App-to-app references resolve to
https://<app-name>.<environment-default-domain>, exactly as standard Container Apps already does.Fixes #19034
User-facing usage
C# AppHost:
TypeScript AppHost:
Scope and limitations
2026-03-02-previewAPI version for the Express environment and its container apps. The pinnedAzure.Provisioning.AppContainersdoes not exposeEnvironmentMode, so a small unmodeled-property shim emits it without adding dependencies. It is marked for removal once the SDK models the property..internalhostname, so referencing an internal-only endpoint fails with guidance to expose it explicitly or use a standard environment.WithReferencenever makes a private endpoint public.AsExpress()combined withWithHttpsUpgrade(false)is rejected during Bicep generation, in either call order, because Express requires HTTPS ingress..AsExisting(...).AsExpress(). This is an AppHost-author declaration; Aspire does not verify or convert the deployed environment's mode.Security considerations
Express references use public HTTPS endpoints. Both the referencing app and the referenced API must be explicitly exposed with
WithExternalHttpEndpoints();WithReferenceneither exposes a private endpoint nor adds authentication, so applications must enforce their own authorization.Existing secure-parameter/manual-secret handling and user-assigned managed-identity ACR pulls are preserved — secrets remain
secretRefvalues rather than literal environment variables. Security review should confirm the public-reference behavior and secret handling.Validation
Aspire.Hosting.Azure.Testsproject, and 115 TypeScript scanner/generator tests pass. The deployment E2E project builds clean, and generated Express Bicep compiles to ARM.2026-03-02-previewrather than the2026-07-01version present in the REST spec; the implementation was corrected to the advertised preview API.environmentMode: Express, zero minimum replicas, actual HTTPS frontend→API calls with a shared secret, HTTP 401 on missing/wrong secret, stable URLs across an application image update, and deployment-summary URLs. Verified independently against the provider afterwards.defaultDomain, and both app FQDNs are exactly<app>.<defaultDomain>.aspire publishwas re-verified against the same app after the final design change and now produces a complete, bindablemain.bicepfor the inter-app reference.Notes for reviewers
An earlier revision passed each app's deployed
ingress.fqdnbetween apps as a Bicep output. That was replaced with the standard default-domain synthesis after confirming against a live Express environment that the conventional hostname holds. The simplification removed the per-app FQDN output, cross-app deployment ordering, circular-reference validation, and a publishing restriction —aspire publishand azd now work for Express inter-app references, andAzurePublishingContext.csis untouched by this PR.Two known items are intentionally out of scope:
ContainerApp.Namethrough a custom name resolver gets a reference that does not match the deployed app — this is pre-existing standard Container Apps behavior that Express now shares, not something introduced here.http://reference to another environment's endpoint is passed through rather than rejected.Checklist
<remarks />and<code />elements on your triple slash comments?