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

az upgrade loops continuously on MacOS #19196

Open
jashby44 opened this issue Aug 11, 2021 · 4 comments
Open

az upgrade loops continuously on MacOS #19196

jashby44 opened this issue Aug 11, 2021 · 4 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request Packaging/Homebrew Upgrade az upgrade
Milestone

Comments

@jashby44
Copy link

Describe the bug

Command Name
az upgrade

Errors:

Upgrade says it will update to 2.27.1, but keeps looping and never completes:

$ 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.27.0. Latest version available is 2.27.1.
Please check the release notes first: https://docs.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n): Y
Already up-to-date.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
^C

To Reproduce:

Run an upgrade from MacOS terminal:

az upgrade

Expected Behavior

Environment Summary

macOS-10.15.7-x86_64-i386-64bit
Python 3.8.11
Installer: HOMEBREW

azure-cli 2.27.0 *

Extensions:
account 0.2.1

Brew version:

$ brew --version
Homebrew 3.2.6
Homebrew/homebrew-core (git revision 5ca8f7e4272; last commit 2021-08-11)
Homebrew/homebrew-cask (git revision 6fa2cf3682; last commit 2021-08-11)

Additional Context

Here is some debug output:

$ az upgrade --debug
cli.knack.cli: Command arguments: ['upgrade', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x110b78700>, <function OutputProducer.on_global_arguments at 0x110be1940>, <function CLIQuery.on_global_arguments at 0x110c26160>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'upgrade': ['azure.cli.command_modules.util']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: util                      0.002         2         4
cli.azure.cli.core: Total (1)                 0.002         2         4
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0  
cli.azure.cli.core: Loaded 2 groups, 4 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : upgrade
cli.azure.cli.core: Command table: upgrade
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x1113aaca0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/me/.azure/commands/2021-08-11.13-14-16.upgrade.90954.log'.
az_command_data_logger: command args: upgrade --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x1113cc160>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x111423c10>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x111423ca0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x111423dc0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x110be19d0>, <function CLIQuery.handle_query_parameter at 0x110c261f0>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x111423b80>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x111423d30>]
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
urllib3.connectionpool: Starting new HTTPS connection (1): raw.githubusercontent.com:443
urllib3.connectionpool: https://raw.githubusercontent.com:443 "GET /Azure/azure-cli/master/src/azure-cli/setup.py HTTP/1.1" 200 2296
cli.azure.cli.command_modules.util.custom: Your current Azure CLI version is 2.27.0. Latest version available is 2.27.1.
cli.azure.cli.command_modules.util.custom: Please check the release notes first: https://docs.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n): Y
cli.azure.cli.command_modules.util.custom: Update homebrew formulae
Already up-to-date.
cli.azure.cli.command_modules.util.custom: Update azure cli with 'brew upgrade azure-cli'
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
Warning: azure-cli 2.27.0 already installed
WARNING: New Azure CLI version available. Running 'az upgrade' to update automatically.
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Your current Azure CLI version is 2.27.0. It will be updated to 2.27.1.
^C

Perhaps a Homebrew issue, but I'm not super familiar with troubleshooting brew, so if anything I can look into please let me know. Thanks

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Aug 11, 2021
@jashby44
Copy link
Author

I previously enabled auto upgrade. For now I've disabled it again with the following so I can run az commands without being prompted to upgrade:

az config set auto-upgrade.enable=no

@yonzhan yonzhan added the Upgrade az upgrade label Aug 11, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Aug 11, 2021
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Aug 11, 2021
@yonzhan yonzhan added this to the Aug 2021 (2021-09-07) milestone Aug 11, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 11, 2021

@jiasli for awareness

@jiasli
Copy link
Member

jiasli commented Aug 13, 2021

On a first glance, this is because 2.27.1 is available on GitHub:

VERSION = "2.27.1"

but not available on Homebrew yet because the PR has not been merged:

Then a loop happens:

  • az upgrade finds from GitHub that there is a new version 2.27.1, but it can only upgrade to 2.27.0
  • When az upgrade is about to finish, the auto-upgrade kicks in
  • az upgrade is called by az upgrade:
    cmd = ['az', 'upgrade', '--all', str(update_all)]
    -> An infinite loop ⚠

@jiasli
Copy link
Member

jiasli commented Aug 14, 2021

We have released 2.27.1 and this issue should be fixed. (Still, we need to solve the endless loop issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request Packaging/Homebrew Upgrade az upgrade
Projects
None yet
Development

No branches or pull requests

4 participants