runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

Az CLI version 21.74.0 is faulty

Open Avanasea opened this issue 6 months ago • 3 comments

Description

We use az devops login in our pipeline, and we had a python warning/issue which is annoying ##[error]/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

We build Packer image two weeks ago (guessing the version of az cli 21.74.0 was upgraded then as well) and as a workaround we downgraded to 21.73.0 in the pipeline, but we don’t want to keep the install.

Please fix

Platforms affected

  • [x] Azure DevOps
  • [ ] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [x] Ubuntu 22.04
  • [x] Ubuntu 24.04
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [ ] macOS 14
  • [ ] macOS 14 Arm64
  • [ ] macOS 15
  • [ ] macOS 15 Arm64
  • [x] Windows Server 2019
  • [x] Windows Server 2022
  • [ ] Windows Server 2025

Image version and build link

init.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources

Is it regression?

https://github.com/actions/runner-images/commit/d453d1099a50e915686b03bcf62724844c0d34f3

Expected behavior

az devops login doesn’t show any warnings

Actual behavior

##[error]/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

Repro steps

  1. az devops login
  2. hit enter

Avanasea avatar Jun 25 '25 12:06 Avanasea

Hi @Avanasea ,Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating.

vidyasagarnimmagaddi avatar Jun 25 '25 13:06 vidyasagarnimmagaddi

Hi @Avanasea , could you please provide from Workflow/ build for issue resolution . thanks

vidyasagarnimmagaddi avatar Jun 26 '25 18:06 vidyasagarnimmagaddi

Here you are:


--------------------------------

/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
## Information parsed from YAML file ##

Checking info is all as expected...

Logout from Azure DevOps...
/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
❌ There were errors found in the hotfix validation.

##[error]Bash exited with code '1'.
##[error]Bash wrote one or more lines to the standard error stream.
##[error]/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources

##[error]/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources

##[error]/opt/az/azcliextensions/azure-devops/azext_devops/dev/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources

Some logs have been taken out because of security reasons We use az devops login and az devops logout in a bash script

Avanasea avatar Jun 27 '25 09:06 Avanasea

@vidyasagarnimmagaddi Can we follow on this, please?

Avanasea avatar Jun 30 '25 13:06 Avanasea

@vidyasagarnimmagaddi

I'm having some other issue as well that is also bound to this az cli version

az storage blob generate-sas <options>

error

ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 321, in get_api_version
    api_version = AZURE_API_PROFILES[api_profile][resource_type]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: <ResourceType.DATA_STORAGE_TABLE: ('azure.data.tables', None)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
    self.commands_loader.load_arguments(command)
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/__init__.py", line 33, in load_arguments
    load_arguments(self, command)
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/_params.py", line 24, in load_arguments
    t_table_service = self.get_sdk('_table_service_client#TableServiceClient',
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 801, in get_sdk
    return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/__init__.py", line 91, in get_sdk
    return _sdk_get_versioned_sdk(cli_ctx.cloud.profile, resource_type, *attr_args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 510, in get_versioned_sdk
    sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 496, in get_versioned_sdk_path
    api_version = get_api_version(api_profile, resource_type)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 328, in get_api_version
    raise APIVersionException(resource_type, api_profile)
azure.cli.core.profiles._shared.APIVersionException: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

version

To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
azure-cli                         2.74.0 *

core                              2.74.0 *
telemetry                          1.1.0

Extensions:
azure-devops                       1.0.1
storage-blob-preview             1.0.0b2

Dependencies:
msal                              1.32.3
azure-mgmt-resource               23.3.0

Python location '/opt/az/bin/python3'
Config directory '/home/runner/.azure'
Extensions directory '/opt/az/azcliextensions'

Python (Linux) 3.12.10 (main, May 27 2025, 09:12:37) [GCC 13.3.0]

Legal docs and information: aka.ms/AzureCliLegal

DEBUG: cli.knack.cli: Command arguments: ['storage', 'blob', 'generate-sas', '--account-name', 'myaccountname', '--container-name', 'uploads', '--permissions', 'racwxtme', '--name', 'flarevm.vhd', '--expiry', '2025-07-04', '--auth-mode', 'login', '--output', 'tsv', '--debug']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f28703e39c0>, <function OutputProducer.on_global_arguments at 0x7f287018a8e0>, <function CLIQuery.on_global_arguments at 0x7f28701d3e20>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'storage': ['azure.cli.command_modules.storage', 'azext_storage_blob_preview']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: storage                   0.164        60       275
DEBUG: cli.azure.cli.core: Total (1)                 0.164        60       275
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: storage-blob-preview      0.004         6        10  /opt/az/azcliextensions/storage-blob-preview
DEBUG: cli.azure.cli.core: Total (1)                 0.004         6        10  
DEBUG: cli.azure.cli.core: Loaded 61 groups, 278 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : storage blob generate-sas
DEBUG: cli.azure.cli.core: Command table: storage blob generate-sas
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f286f34c2c0>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/runner/.azure/commands/2025-07-03.12-16-09.storage_blob_generate-sas.2832.log'.
INFO: az_command_data_logger: command args: storage blob generate-sas --account-name {} --container-name {} --permissions {} --name {} --expiry {} --auth-mode {} --output {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f286f39c7c0>]
DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 471, in _get_attr
    op = import_module(full_mod_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azext_storage_blob_preview.vendored_sdks.azure_storage_blob.v2021_12_02.blob'

DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 471, in _get_attr
    op = import_module(full_mod_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azext_storage_blob_preview.vendored_sdks.azure_storage_blob.v2021_12_02.file'

DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 321, in get_api_version
    api_version = AZURE_API_PROFILES[api_profile][resource_type]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: <ResourceType.DATA_STORAGE_TABLE: ('azure.data.tables', None)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
    self.commands_loader.load_arguments(command)
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/__init__.py", line 33, in load_arguments
    load_arguments(self, command)
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/_params.py", line 24, in load_arguments
    t_table_service = self.get_sdk('_table_service_client#TableServiceClient',
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 801, in get_sdk
    return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/__init__.py", line 91, in get_sdk
    return _sdk_get_versioned_sdk(cli_ctx.cloud.profile, resource_type, *attr_args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 510, in get_versioned_sdk
    sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 496, in get_versioned_sdk_path
    api_version = get_api_version(api_profile, resource_type)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 328, in get_api_version
    raise APIVersionException(resource_type, api_profile)
azure.cli.core.profiles._shared.APIVersionException: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'

ERROR: cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
ERROR: az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
ERROR: cli.azure.cli.core.azclierror: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 321, in get_api_version
    api_version = AZURE_API_PROFILES[api_profile][resource_type]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: <ResourceType.DATA_STORAGE_TABLE: ('azure.data.tables', None)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
    self.commands_loader.load_arguments(command)
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/__init__.py", line 33, in load_arguments
    load_arguments(self, command)
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/_params.py", line 24, in load_arguments
    t_table_service = self.get_sdk('_table_service_client#TableServiceClient',
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 801, in get_sdk
    return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/__init__.py", line 91, in get_sdk
    return _sdk_get_versioned_sdk(cli_ctx.cloud.profile, resource_type, *attr_args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 510, in get_versioned_sdk
    sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 496, in get_versioned_sdk_path
    api_version = get_api_version(api_profile, resource_type)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 328, in get_api_version
    raise APIVersionException(resource_type, api_profile)
azure.cli.core.profiles._shared.APIVersionException: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'
ERROR: az_command_data_logger: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 321, in get_api_version
    api_version = AZURE_API_PROFILES[api_profile][resource_type]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: <ResourceType.DATA_STORAGE_TABLE: ('azure.data.tables', None)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
    self.commands_loader.load_arguments(command)
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/__init__.py", line 33, in load_arguments
    load_arguments(self, command)
  File "/opt/az/azcliextensions/storage-blob-preview/azext_storage_blob_preview/_params.py", line 24, in load_arguments
    t_table_service = self.get_sdk('_table_service_client#TableServiceClient',
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/__init__.py", line 801, in get_sdk
    return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/__init__.py", line 91, in get_sdk
    return _sdk_get_versioned_sdk(cli_ctx.cloud.profile, resource_type, *attr_args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 510, in get_versioned_sdk
    sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 496, in get_versioned_sdk_path
    api_version = get_api_version(api_profile, resource_type)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/profiles/_shared.py", line 328, in get_api_version
    raise APIVersionException(resource_type, api_profile)
azure.cli.core.profiles._shared.APIVersionException: Unable to get API version for type 'ResourceType.DATA_STORAGE_TABLE' in profile 'latest'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f286f34c540>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 0.411 seconds (init: 0.139, invoke: 0.272)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 8112 in cache file under /home/runner/.azure/telemetry/20250703121609838
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /home/runner/.azure /home/runner/.azure/telemetry/20250703121609838"
INFO: telemetry.process: Return from creating process 2852
INFO: telemetry.main: Finish creating telemetry upload process.

upgrading to 2.75.0 ( whilst adding --auth-mode login --as-user ) fixes this

Kaloszer avatar Jul 03 '25 12:07 Kaloszer

We're seeing this problem also on the following type of task in Azure Pipelines

  - task: AzureCLI@2
    displayName: 'Cache Headers LF ClickOnce'
    inputs:
      azureSubscription: '$(azureSubscription)'
      scriptType: pscore
      scriptPath: '$(Pipeline.Workspace)/SetCacheHeaders.ps1'

az storage blob list is the command that throws for us

MatthewSteeples avatar Jul 09 '25 10:07 MatthewSteeples

Hi @Avanasea , @Kaloszer , the new version of 2.75.0 , has been rolled out. Issue will be resolved . thanks

vidyasagarnimmagaddi avatar Jul 11 '25 14:07 vidyasagarnimmagaddi