-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamPossible-SolutionSimilar-IssueUpgradeaz upgradeaz upgradecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
When running az upgrade --yes from Azure CLI v2.67.0 on the Azure DevOps agent using ubuntu-latest image it fails to upgrade to the 2.77.0 version
Related command
az upgrade --yes
Errors
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.76.0. It will be updated to 2.77.0.
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 219877 files and directories currently installed.)
Preparing to unpack .../azure-cli_2.77.0-1~noble_amd64.deb ...
Unpacking azure-cli (2.77.0-1~noble) over (2.76.0-1~noble) ...
Setting up azure-cli (2.77.0-1~noble) ...
Running kernel seems to be up-to-date.
Restarting services...
Service restarts being deferred:
systemctl restart hosted-compute-agent.service
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/util/custom.py", line 160, in upgrade_version
File "/opt/az/lib/python3.12/importlib/__init__.py", line 130, in reload
ModuleNotFoundError: spec not found for the module 'subprocess'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/opt/az/lib/python3.12/site-packages/azure/cli/__main__.py", line 41, in <module>
File "/opt/az/lib/python3.12/site-packages/azure/cli/__main__.py", line 27, in cli_main
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 245, in invoke
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 129, in exception_handler
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/util.py", line 58, in handle_exception
ModuleNotFoundError: No module named 'jmespath'
Issue script & Debug output
DEBUG: cli.knack.cli: Command arguments: ['upgrade', '--yes', '--debug']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
ModuleNotFoundError: No module named 'deviceid'
INFO: cli.azure.cli.core.decorators: Suppress exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/util/custom.py", line 160, in upgrade_version
File "/opt/az/lib/python3.12/importlib/__init__.py", line 130, in reload
ModuleNotFoundError: spec not found for the module 'subprocess'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/azure/cli/__main__.py", line 41, in <module>
File "/opt/az/lib/python3.12/site-packages/azure/cli/__main__.py", line 27, in cli_main
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 245, in invoke
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 129, in exception_handler
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/util.py", line 58, in handle_exception
ModuleNotFoundError: No module named 'jmespath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/decorators.py", line 79, in _wrapped_func
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/telemetry.py", line 330, in conclude
File "/opt/az/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py", line 49, in save
ModuleNotFoundError: No module named 'azure.cli.telemetry.components'
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/util/custom.py", line 160, in upgrade_version
File "/opt/az/lib/python3.12/importlib/__init__.py", line 130, in reload
ModuleNotFoundError: spec not found for the module 'subprocess'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/opt/az/lib/python3.12/site-packages/azure/cli/__main__.py", line 41, in <module>
File "/opt/az/lib/python3.12/site-packages/azure/cli/__main__.py", line 27, in cli_main
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 245, in invoke
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 129, in exception_handler
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/util.py", line 58, in handle_exception
ModuleNotFoundError: No module named 'jmespath'
Expected behavior
It should update to 2.77.0 successfully.
Environment Summary
azure-cli 2.76.0 *
core 2.76.0 *
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location '/opt/az/bin/python3'
Config directory '/home/vsts/.azure'
Extensions directory '/opt/az/azcliextensions'
Python (Linux) 3.12.10 (main, Jul 29 2025, 09:28:48) [GCC 13.3.0]
Additional context
No response
jurekkow, neuhaus-j, mchudinov, chadwessel, mirontoli and 3 more
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamPossible-SolutionSimilar-IssueUpgradeaz upgradeaz upgradecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that