Skip to content

Add Express Container Apps support in resource tree#1078

Open
philliphoff wants to merge 1 commit into
mainfrom
philliphoff/express-app-resources
Open

Add Express Container Apps support in resource tree#1078
philliphoff wants to merge 1 commit into
mainfrom
philliphoff/express-app-resources

Conversation

@philliphoff
Copy link
Copy Markdown
Member

@philliphoff philliphoff commented May 14, 2026

Azure Container Apps now supports Express environments, which have their own portal experience at https://containerapps.azure.com. This PR adds initial awareness of Express environments and apps to the extension's resource tree.

Approach

  • Detecting Express environments: The environmentMode property is only available in API version 2026-03-02-preview, which the current SDK (@azure/arm-appcontainers v2.2.0) does not include. A preview API client factory (createContainerAppsPreviewAPIClient) overrides the API version via a pipeline policy. Because the SDK deserializer strips unknown properties, the raw HTTP response is captured via onResponse to extract environmentMode.

  • Visual distinction: Express managed environments and their child container apps show (Express) as the tree item description.

  • "Open in Express Portal" command: A new context menu command appears only on Express container apps (gated by an express context value). It opens the Express portal URL at https://containerapps.azure.com/apps/{subscriptionId}/{resourceGroup}/{appName}/overview.

  • Scale tolerance: Express app templates may not include a scale property. ScaleItem now falls back to an empty object instead of throwing via nonNullValueAndProp, preventing errors when expanding Express app nodes.

Non-obvious details

  • The preview API version override works by adding a pipeline policy that rewrites the api-version query parameter on every request. This is necessary because the SDK's built-in Parameters.apiVersion is marked isConstant: true and ignores the client's apiVersion property during serialization.
  • The express context value is only added to ContainerAppItem (not ContainerAppResourceItem in the flat view) since Express status is derived from the parent environment, which the flat view does not resolve.

Resolves #1077

@philliphoff philliphoff marked this pull request as ready for review May 14, 2026 18:03
@philliphoff philliphoff requested a review from a team as a code owner May 14, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Express Container Apps environments and apps in resource tree

2 participants