Skip to content

fix: Unit tests and Bug fixes#2310

Merged
Roopan-Microsoft merged 7 commits into
Azure-Samples:devfrom
PadhiAjit-Microsoft:unittest_fix
Jul 16, 2026
Merged

fix: Unit tests and Bug fixes#2310
Roopan-Microsoft merged 7 commits into
Azure-Samples:devfrom
PadhiAjit-Microsoft:unittest_fix

Conversation

@PadhiAjit-Microsoft

@PadhiAjit-Microsoft PadhiAjit-Microsoft commented Jul 15, 2026

Copy link
Copy Markdown

Purpose

  • This pull request introduces several improvements and new features to both the infrastructure provisioning script and the backend/frontend code. The main changes are a significant refactor of the acr_build_push_update.ps1 script for better clarity, extensibility, and user feedback, improved exception handling for upstream HTTP errors in the backend, and the addition of an Easy Auth-compatible endpoint in the frontend for authentication claims.

Infrastructure script refactor and enhancements:

  • infra/scripts/post-provision/acr_build_push_update.ps1:
    • Refactored and modularized the script for clarity, with improved step-by-step output, error handling, and elapsed time reporting. Service definitions are now centralized in a single $Services array, making it easier to add new services. The script now provides clearer summaries and progress information. [1] [2]
    • Improved ACR (Azure Container Registry) public access logic for WAF-locked deployments, with clearer messaging and robust cleanup.
    • Streamlined the build context and remote build submission for each service, with per-service progress and error reporting.
    • Enhanced Container App update logic, with improved service discovery and error messages.

Backend improvements:

  • Exception handling:
    • Added a handler for httpx.HTTPError so that upstream HTTP fetch failures (e.g., remote 4xx/5xx, connection errors, timeouts) now return a 502 Bad Gateway response instead of a generic 500 error. This improves error transparency for API consumers. [1] [2] [3] [4]

Frontend additions:

  • Authentication endpoint:
    • Added a new /.auth/me route that decodes Azure Easy Auth headers and returns the claims payload in the format expected by the SPA. This enables seamless authentication integration in Container Apps environments, matching App Service Easy Auth behavior. [1] [2]

These changes collectively improve deployment reliability, error diagnostics, and authentication support for the application.

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

@PadhiAjit-Microsoft PadhiAjit-Microsoft changed the title fix: unit test fixes fix: Unit tests and Bug fixes Jul 16, 2026
@PadhiAjit-Microsoft
PadhiAjit-Microsoft marked this pull request as ready for review July 16, 2026 13:38
@Roopan-Microsoft
Roopan-Microsoft merged commit ef96d95 into Azure-Samples:dev Jul 16, 2026
6 of 8 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.

2 participants