Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompts to upgrade from 2.50.0 to 2.51.0, then fails to upgrade (MacOS) #27173

Closed
mkheck opened this issue Aug 15, 2023 · 9 comments
Closed

Prompts to upgrade from 2.50.0 to 2.51.0, then fails to upgrade (MacOS) #27173

mkheck opened this issue Aug 15, 2023 · 9 comments
Assignees
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team Installation question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Upgrade az upgrade
Milestone

Comments

@mkheck
Copy link

mkheck commented Aug 15, 2023

Describe the bug

Running az upgrade on a 2.50.0 install of azure-cli on MacOS results in following:

az upgrade
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Your current Azure CLI version is 2.50.0. Latest version available is 2.51.0.

Please check the release notes first: https://docs.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n):

Updated 1 tap (homebrew/cask-fonts).

Warning: azure-cli 2.50.0_1 already installed
CLI upgrade failed or aborted.

In an effort to resolve this, I've completely uninstalled the azure-cli, deleted the ~/.azure directory, and reinstalled az using homebrew as prescribed here: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos

Same results.

NOTE: This is a significant problem because because it affects scripting. As an example: I have creation/configuration scripts I use, and I have several upcoming sessions at a partner conference showcasing Azure Spring Apps etc. Those scripts fail at key points due to the prompt inserting itself into the results (e.g. --query queries assigning values to env vars). This would seem to indicate that customer's production scripts could also be affected, at least in certain circumstances.

Related command

az upgrade

Errors

Warning: azure-cli 2.50.0_1 already installed
CLI upgrade failed or aborted.

Issue script & Debug output

az upgrade

Expected behavior

It should upgrade to the current version as indicated in the prompt it provides when running az commands:

Your current Azure CLI version is 2.50.0. Latest version available is 2.51.0.

Environment Summary

az --version 2 ↵

azure-cli 2.50.0 *

core 2.50.0 *
telemetry 1.0.8 *

Dependencies:
msal 1.22.0
azure-mgmt-resource 23.1.0b2

Python location '/usr/local/Cellar/azure-cli/2.50.0_1/libexec/bin/python'
Extensions directory '/Users/markheckler/.azure/cliextensions'

Python (Darwin) 3.10.12 (main, Jun 20 2023, 17:00:24) [Clang 14.0.3 (clang-1403.0.22.14.1)]

Legal docs and information: aka.ms/AzureCliLegal

You have 3 update(s) available. Consider updating your CLI installation with 'az upgrade'

Additional context

No response

@mkheck mkheck added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 15, 2023
@azure-client-tools-bot-prd
Copy link

Hi @mkheck,

2.50.0 is not the latest Azure CLI(2.51.0).

Please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Aug 15, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 15, 2023

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Upgrade az upgrade labels Aug 15, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Installation labels Aug 15, 2023
@mkheck
Copy link
Author

mkheck commented Aug 15, 2023

Thank you @yonzhan, please let me know how I can help, happy to do so.

@NullChecked
Copy link

@mkheck - having the same issue on my Mac.

@yonzhan yonzhan added this to the Backlog milestone Aug 15, 2023
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 15, 2023
@bebound
Copy link
Contributor

bebound commented Aug 16, 2023

2.51 is not available on homebrew, see #27047
Please disable autoupgrade az config set auto-upgrade.enable=no
Duplicate of #27091

@mkheck
Copy link
Author

mkheck commented Aug 16, 2023

Hi @bebound, that stops the "forced" upgrade but this message still applies with every command executed:

You have 3 update(s) available. Consider updating your CLI installation with 'az upgrade'

Still, progress. 👍

@NullChecked
Copy link

I disabled all updates for now. az config set auto-upgrade.all=no

@hitec-lbmc
Copy link

I was able to successfully upgrade it on my Mac using pip – 

pip3 install azure-cli==2.51.0

% az --version
azure-cli                         2.51.0

core                              2.51.0
telemetry                          1.1.0

Dependencies:
msal                            1.24.0b1
azure-mgmt-resource             23.1.0b2

Python location '/opt/homebrew/opt/[email protected]/bin/python3.11'
Extensions directory '/Users/hiteshashar/.azure/cliextensions'

Python (Darwin) 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

@bebound
Copy link
Contributor

bebound commented Sep 6, 2023

Close as 2.52.0 is available in Homebrew.

@bebound bebound closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team Installation question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Upgrade az upgrade
Projects
None yet
Development

No branches or pull requests

6 participants