fix(samples): map SWA-unsupported deploy regions so azd up doesn't fail on region - #24
Merged
Gregory Joseph (gnjoseph) merged 1 commit intoJul 9, 2026
Conversation
The react-spa-functions sample's infra/web.bicep pinned the Static Web App to the deploy location (= resource group location). When that region is one Static Web Apps does not support (e.g. eastus), \�zd up\ fails with 'Static Web Apps aren't available in <region>', so every deploy fails on the first attempt and the agent has to inspect and patch the bicep before retrying — inflating deploy time 2-3x and making it non-deterministic. Map an unsupported region to a supported nearby one (eastus2) for the Static Web App resource only; the resource group stays in the requested region. This was surfaced by the continuous SPA-deploy eval loop across repeated runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Gregory Joseph (gnjoseph)
force-pushed
the
agents/pr3-swa-region-fix
branch
from
July 9, 2026 13:04
2a32ffd to
a0fe184
Compare
Gregory Joseph (gnjoseph)
merged commit Jul 9, 2026
1b75869
into
feat/spe-mcp-server
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
react-spa-functionssample'sinfra/web.biceppinned the Static Web App to the deploylocation(= resource group location). Azure Static Web Apps is only available in a subset of regions, so alocationthat is valid for the resource group (e.g.eastus) is rejected for the SWA with "Static Web Apps aren't available ineastus".Result: every
azd upfails on the first attempt, and an agent driving the deploy has to notice the error, inspect the bicep, patch in a region mapping, and retry — inflating deploy time 2-3x and making it non-deterministic.How it was found
Surfaced by the continuous SPA-deploy eval loop (internal control-plane repo) across repeated live runs: with
location=eastusthe agent hitDeploy failed: Static Web Apps aren't available in eastusand re-derived the same bicep fix on every run (project_deploycalled 2-3x; ~388-624s end-to-end).Fix
Map an unsupported deploy region to a supported nearby region (
eastus2) for the Static Web App resource only — the resource group still uses the requestedlocation. One-line-of-logic, defensive, and matches the SWA availability docs.bicep buildcompiles clean.reference-architectures.test.ts(16 tests) pass (those cover the C# sample; this change is isolated to the React sample'sweb.bicep).Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com