-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Accountaz login/accountaz login/accountAuto-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 teamPackagingcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.feature-request
Milestone
Description
Describe the bug
Due to the very large size of installing the azure CLI in docker container we use the https://github.com/clumio-code/azure-sdk-trim tool save hundreds of MBs. This tool trims the older SDKs since in most case they are useless and just a waste of space for the end users.
Related command
az login
Errors
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: No module named 'azure.mgmt.resource.subscriptions.v2019_11_01'
Traceback (most recent call last):
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 139, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 174, in login
subscriptions = subscription_finder.find_using_specific_tenant(tenant, credential)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 807, in find_using_specific_tenant
subscriptions = client.subscriptions.list()
^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.4/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/_subscription_client.py", line 158, in subscriptions
from .v2019_11_01.operations import SubscriptionsOperations as OperationClass
ModuleNotFoundError: No module named 'azure.mgmt.resource.subscriptions.v2019_11_01'
Issue script & Debug output
see above
Expected behavior
The azure CLI should not depend on 4y old APIs and work with the latest APIs.
Environment Summary
> az --version
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 '/root/.pyenv/versions/3.11.4/bin/python3'
Extensions directory '/root/.azure/cliextensions'
Python (Darwin) 3.11.4 (main, Jun 27 2023, 17:18:33) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Labels
Accountaz login/accountaz login/accountAuto-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 teamPackagingcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.feature-request