Skip to content

fix(region-discovery): remove Azure auth dependency, use public Retail Prices API - #1777

Open
Simon J (simonjj) wants to merge 1 commit into
microsoft:mainfrom
simonjj:fix/region-discovery-no-auth
Open

fix(region-discovery): remove Azure auth dependency, use public Retail Prices API#1777
Simon J (simonjj) wants to merge 1 commit into
microsoft:mainfrom
simonjj:fix/region-discovery-no-auth

Conversation

@simonjj

Copy link
Copy Markdown
Collaborator

Problem

The Region Discovery workflow (.github/workflows/region-discovery.yml) runs daily and authenticates to Azure via OIDC (azure/login@v2) to query ARM for per-region ACA feature availability. The scheduled run has been failing every day because the Azure login is now blocked by a Conditional Access policy:

AADSTS53003: Access has been blocked by Conditional Access policies.

As a result, aca-getting-started/data/region-features.json (and the published Region Availability page) has gone stale.

Fix

Switch discovery to the public, anonymous Azure Retail Prices API. Feature availability is derived from the published per-region billing meters of the Azure Container Apps service, so no Azure credential or subscription is required — eliminating the auth failure mode entirely.

Changes

  • discover.py — query the Retail Prices API instead of ARM. Meter → feature mapping: Standard * → Consumption, Dedicated * → Dedicated, Dynamic Sessions → sessionPools, *GPU* → GPU SKUs. Availability Zone support is kept as a maintained static list (not exposed through pricing).
  • workflow — remove the Azure Login (OIDC) and Verify Azure session steps and the --subscription-id argument.
  • pyproject.toml — drop azure-identity / azure-mgmt-resource (now requests only).
  • README.md — document the new public data source and the granularity tradeoff.
  • data — regenerate region-features.json (58 regions, 10 features).

Tradeoff

Pricing meters do not distinguish individual dedicated profile sizes (D4/D8/E16/…), so these collapse into a single Dedicated capability. GPU SKUs and Availability Zones remain differentiated. The page JS is fully data-driven and renders the new schema without changes.

Verification

Validated on a fork: uv sync resolves only requests; py_compile passes; the workflow runs green and publishes the page anonymously.

…l Prices API

The daily Region Discovery job authenticates to Azure via OIDC
(azure/login@v2) and queries ARM for per-region feature availability.
The scheduled run has been failing because the login is now blocked by a
Conditional Access policy (AADSTS53003), so the region-availability page
has gone stale.

This switches discovery to the public, anonymous Azure Retail Prices API
(https://prices.azure.com), deriving feature availability from the
published per-region billing meters of the Azure Container Apps service.
No Azure credential or subscription is required, removing the auth
failure mode entirely.

Changes:
- discover.py: query Retail Prices API instead of ARM; map meters to
  features (Standard->Consumption, Dedicated->Dedicated, Dynamic
  Sessions->sessionPools, *GPU*->GPU SKUs). AZ support kept as a
  maintained static list (not exposed via pricing).
- workflow: drop azure/login + Verify Azure session steps and the
  --subscription-id argument.
- pyproject: drop azure-identity / azure-mgmt-resource (requests only).
- README: document the new public data source and the granularity
  tradeoff (dedicated profile sizes collapse to a single Dedicated).
- data: regenerate region-features.json (58 regions, 10 features).

Tradeoff: pricing meters do not distinguish individual dedicated profile
sizes (D4/D8/E16/...), so these collapse into a single Dedicated
capability. GPU SKUs and Availability Zones remain differentiated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant