You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When az acr login fails for docker login, the command should return a non-zero status code.
Why wasn't this the case? the check was if stderr is not empty. In the case docker is not running, stderr is empty and the error is written to stdout:
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature
This checklist is used to make sure that common guidelines for a pull request are followed.
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).
After that please run the following commands to enable git hooks:
ronlv4
changed the title
[Acr] BREAKING CHANGE: az acr login: Fix login status code when command fails
[Container Registry] BREAKING CHANGE: az acr login: Fix login status code when command fails
Mar 1, 2025
I should be more precise on the issue, the status code is 0 when the command fails for docker login, meaning it passed the internal az acr validations (for existing subscription and acr).
so for valid arguments you can reproduce the issue:
zhoxing-ms
changed the title
[ACR]: az acr login: Fix login status code when command fails
[ACR] az acr login: Fix login status code when command fails
May 13, 2025
please note that Azure CLI will have a code freeze on 05/27/2025 07:00 UTC for the upcoming release. Please address these CI issues ASAP, otherwise it has to be postponed to next sprint (07-01).
@ronlv4 This PR encountered some issues of Github that prevented it from triggering the CI pipeline again. Could you please create a new PR with the same functionality? Then we will replace this PR with the new one, and then merge the new PR
@ronlv4 This PR encountered some issues of Github that prevented it from triggering the CI pipeline again. Could you please create a new PR with the same functionality? Then we will replace this PR with the new one, and then merge the new PR
opened #31692 .
let me know if it's still not working, I'll delete the repo and clone it again
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
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.
Related command
az acr login
Description
When az acr login fails for docker login, the command should return a non-zero status code.
Why wasn't this the case? the check was if stderr is not empty. In the case docker is not running, stderr is empty and the error is written to stdout:
fixes #27907
Testing Guide
Test acr module
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.