Azure / Azure/azure-cli

az upgrade loops continuously

Open
#19,196 6 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad common issue customer-reported feature-request Packaging/Homebrew Possible-Solution Similar-Issue Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## 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:

```bash
$ 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 [, , ]
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 []
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 [.add_subscription_parameter at 0x1113cc160>, .register_query_examples at 0x111423c10>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x111423ca0>, .add_cache_arguments at 0x111423dc0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .handle_example_parameter at 0x111423b80>, .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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.