Skip to content

fix: Dev to main PR - #1132

Merged
Avijit-Microsoft merged 4 commits into
mainfrom
dev
Aug 10, 2026
Merged

fix: Dev to main PR#1132
Avijit-Microsoft merged 4 commits into
mainfrom
dev

Conversation

@Dhruvkumar-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces logic to better handle deployments using the default Microsoft Container Registry (MCR) "bootstrap" images for backend and MCP container apps. The main improvements include automatically adjusting the ingress port and omitting registry configuration when the bootstrap image is detected, as well as several infrastructure enhancements and minor fixes.

Container App Deployment Logic:

  • Bootstrap Image Detection: Added logic to detect if the backend or MCP container image is the default MCR bootstrap image (azuredocs/containerapps-helloworld). This detection is exposed via new variables (backendUsesBootstrapImage, mcpUsesBootstrapImage). [1] [2] [3] [4]
  • Dynamic Ingress Port: The container app ingress port is now set to 80 if using the bootstrap image, otherwise it defaults to the previous values (8000 for backend, 9000 for MCP). [1] [2] [3] [4] [5] [6]
  • Registry Configuration: If using the bootstrap image, container registry credentials are omitted (registries set to null). Otherwise, the registry configuration remains as before. [1] [2] [3] [4] [5] [6]

Infrastructure and Configuration Enhancements:

  • App Service Logging: Introduced a new logsConfig resource for App Service with verbose logging, error messages, and HTTP logs enabled. This replaces the previous inline logs configuration. [1] [2]
  • Networking Parameters: Added vnetRouteAllEnabled and imagePullTraffic parameters to support private networking scenarios. [1] [2]
  • Environment Variables: Added new environment variables for image quality and storage container in the backend.

Other Minor Updates:

  • Updated template hashes and metadata for Bicep-generated JSON files. [1] [2] [3] [4] [5]
  • Changed the default virtualMachineAvailabilityZone value from 1 to -1.
  • Updated the model name example in parameter metadata.

These changes improve deployment flexibility, especially for quick starts and demos using the default bootstrap image, and enhance logging and networking capabilities for production scenarios.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the deployment and post-provisioning workflow to better support Azure Container Apps initially provisioned with the default MCR “bootstrap” image (azuredocs/containerapps-helloworld), ensuring ingress/registry configuration behaves correctly until the real images are built and swapped in.

Changes:

  • Add bootstrap-image detection in infra templates and conditionally set Container App ingress port to 80 and omit registry config when bootstrap images are used.
  • Update post-provision scripts to update Container App image and ingress target port (and registries) in a single helper function.
  • Introduce additional infra adjustments (App Service logging configuration, new env vars, and regenerated Bicep JSON outputs/hashes).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
infra/scripts/post-provision/Build-And-Push-Images.ps1 Adds helper to update Container App image + ingress port + registries during post-provision.
infra/scripts/post-provision/build_and_push_images.sh Adds helper (jq-based) to update Container App image + ingress port + registries during post-provision.
infra/main.json Regenerated router template JSON; includes bootstrap detection + tag changes.
infra/bicep/main.json Regenerated vanilla Bicep ARM JSON; includes bootstrap detection, conditional ingress/registries, and new backend env vars.
infra/bicep/main.bicep Adds bootstrap-image detection vars and applies conditional ingress port + conditional registries.
infra/avm/main.json Regenerated AVM ARM JSON; includes bootstrap detection, conditional ingress/registries, and App Service logging/networking parameters.
infra/avm/main.bicep Adds bootstrap-image detection vars and applies conditional ingress port + conditional registries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/scripts/post-provision/build_and_push_images.sh Outdated
Comment thread infra/scripts/post-provision/Build-And-Push-Images.ps1
Comment thread infra/bicep/main.json
Comment thread infra/avm/main.json
Comment thread infra/main.json Outdated
Copilot AI review requested due to automatic review settings August 7, 2026 10:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Suppressed comments (1)

infra/scripts/post-provision/build_and_push_images.sh:61

  • In the jq transform, (.identity.userAssignedIdentities | keys[0]) will throw a jq runtime error when userAssignedIdentities is null/missing (e.g., system-assigned identity only). That prevents the intended actionable error ("Container App does not have a user-assigned identity...") from being emitted.

Use a null-safe default object before calling keys so the script fails with your explicit message.

             | (.identity.userAssignedIdentities | keys[0]) as $identity_resource_id
             | if $identity_resource_id == null then error("Container App does not have a user-assigned identity for ACR image pulls") else . end

@Avijit-Microsoft
Avijit-Microsoft merged commit fd49d73 into main Aug 10, 2026
6 checks passed
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.

5 participants