fix: remove hardcoded code deploy region restriction, use dynamic hosted-agent regions#8422
Merged
Conversation
…ted-agent regions Code deploy is now supported in all hosted-agent regions. Remove the hardcoded CodeDeployRegions allowlist (westus2, canadacentral, northcentralus) and use the dynamically-fetched hosted-agent region list during init. At deploy time, remove the client-side region gate entirely — the server will reject unsupported regions with a clear error message. Resolves the request to support Canada East and Germany West Central for code deploy without requiring further client changes.
24912eb to
8288e71
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the hardcoded code-deploy region allowlist for Azure AI Agents and aligns init-time project filtering with the hosted-agent dynamic region mechanism.
Changes:
- Removed
CodeDeployRegionsfrom project configuration. - Updated Foundry project selection for code deploy to use
supportedRegionsForInit(ctx). - Removed deploy-time client-side region allowlist validation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cli/azd/extensions/azure.ai.agents/internal/project/config.go |
Removes the obsolete hardcoded code-deploy region list. |
cli/azd/extensions/azure.ai.agents/internal/cmd/init_foundry_resources_helpers.go |
Switches code-deploy project filtering to dynamic hosted-agent regions. |
cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go |
Removes deploy-time region allowlist enforcement while retaining the location presence check. |
4 tasks
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Propagate context.Canceled/DeadlineExceeded instead of treating as recoverable fetch failure in code-deploy region filtering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
863429f to
8d2dd28
Compare
therealjohn
approved these changes
May 28, 2026
trangevi
approved these changes
May 28, 2026
Member
|
/check-enforcer override |
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.
Fixes #8427
Summary
Code deploy is now supported in all hosted-agent regions (confirmed by service team). This PR removes the hardcoded 3-region allowlist and unifies code deploy region handling with the existing dynamic hosted-agent region mechanism.
Background
westus2,canadacentral,northcentralusvia a hardcodedCodeDeployRegionsvariable inconfig.goantrikshjain/add-region) already addedcanadaeastandgermanywestcentralto the hosted-agent fallback manifest -- but code deploy was still blocked by its own hardcoded listChanges
internal/project/config.goCodeDeployRegionsvariableinternal/cmd/init_foundry_resources_helpers.goproject.CodeDeployRegionswithsupportedRegionsForInit(ctx)(dynamic fetch with embedded fallback); propagate context cancellation instead of treating as recoverableinternal/project/service_target_agent.goBehavior After This Change
azd ai agent init(code deploy mode): Foundry projects are filtered using the same dynamic region list as container deployazd deploy: No client-side region gate -- if a region is somehow unsupported, the server returns a clear errorhttps://aka.ms/azd-ai-agents/regionsis updated (or when the embedded fallback JSON is refreshed)Testing
go build ./...-- PASSgo test ./internal/project/ ./internal/cmd/-- PASS (all tests, no regressions)