[ACR] az acr login: Fix regional endpoint matching for registries with DNL suffix#33381
[ACR] az acr login: Fix regional endpoint matching for registries with DNL suffix#33381lizMSFT wants to merge 2 commits into
az acr login: Fix regional endpoint matching for registries with DNL suffix#33381Conversation
️✔️AzureCLI-FullTest
|
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes regional endpoint matching in az acr login for registries with a DNL (Dedicated Namespace Label) suffix by deriving the prefix from registry.login_server rather than registry_name.
Changes:
- Replace
registry_namewith the hostname portion ofregistry.login_serverwhen building the regional endpoint prefix.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
az acr login: Fix regional endpoint matching for registries with DNL suffix
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Use login_server hostname (before the first dot) instead of registry_name when building the regional endpoint prefix. This accounts for registries with a DNL (Dedicated Network Link) suffix in their login server name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b5e7ce3 to
53e3042
Compare
Related command
az acr loginDescription
When a registry has a DNL suffix, the registry_name does not match the prefix of the regional endpoint hostname. This fix uses registry.login_server.split('.')[0] (the login server hostname before the first dot) instead of registry_name when constructing the regional endpoint prefix, so that DNL registries correctly resolve to their regional login endpoint.
Testing Guide

History Notes
[ACR]
az acr login: Fix regional endpoint matching for registries with DNL suffixThis 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.