[ACR] az acr import: Warn when a regional source endpoint falls back to the source registry's home region - #34032
Open
Zoey Li (lizMSFT) wants to merge 1 commit into
Conversation
Disclose that ACR imports use the source registry home region when a regional endpoint is supplied, and remove the misleading help example. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e546649a-5989-4d8f-8f65-a63ce8acba2e
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
Bin Du (northtyphoon) and
Terence Truong (terencet-dev)
September 4, 2026 05:00
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newly introduced warning text is emitted before source registry resolution and is phrased in a way that can be misleading in failure cases.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates az acr import to explicitly warn when a regional ACR endpoint is provided as the source, since imports ultimately resolve the registry by ARM resource ID and cannot preserve/select the requested regional replica.
Changes:
- Add a warning when a regional endpoint (
<registry>.<region>.geo<suffix>) is detected and converted to a standard login server. - Make regional endpoint suffix matching case-insensitive.
- Remove a help example that implied regional endpoint selection for imports.
File summaries
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/acr/import.py |
Adds the warning constant + emission during regional endpoint normalization; updates suffix matching to be case-insensitive. |
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_regional_endpoint_utils.py |
Extends unit tests to validate warning behavior and case-insensitive handling. |
src/azure-cli/azure/cli/command_modules/acr/_help.py |
Removes the regional-endpoint import example from help text. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+28
to
+29
| REGIONAL_ENDPOINT_IMPORT_WARNING = "ACR imports do not support regional endpoint selection. " \ | ||
| "This import will use the source registry's home region." |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Johnson Shi (johnsonshi)
approved these changes
Sep 4, 2026
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.
🤖 PR Validation — ️✔️ All clear
Related command
az acr importDescription
When an ACR regional endpoint is supplied as the import source, the CLI resolves it to the registry's ARM resource ID. Because the resource ID does not preserve the selected region, the import uses the source registry's home region.
This change:
Testing Guide

History Notes
[ACR]
az acr import: Warn when a regional source endpoint falls back to the source registry's home regionThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.