Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

Attribute TaskUpdateParameters does not exist in az acr task identity remove #21900

Closed stan-sz closed 1 month ago

stan-sz commented 2 years ago

Describe the bug

Command Name az acr task identity remove

Errors:

The command failed with an unexpected error. Here is the traceback:
Attribute TaskUpdateParameters does not exist.
Traceback (most recent call last):
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 428, in __getattr__
    return self._operations_groups_value[item]
KeyError: 'TaskUpdateParameters'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\knack\cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 658, in execute
    raise ex
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\command_operation.py", line 121, in handler
    return op(**command_args)
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\command_modules\acr\task.py", line 563, in acr_task_identity_remove
    TaskUpdateParameters = cmd.get_models('TaskUpdateParameters', operation_group='TaskUpdateParameters')
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 351, in get_models
    return self.loader.get_sdk(*attr_args, resource_type=resource_type, mod='models',
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\__init__.py", line 756, in get_sdk
    return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()),
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\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 "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 640, in get_versioned_sdk
    sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group)
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 632, in get_versioned_sdk_path
    api_version = getattr(api_version, operation_group)
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 430, in __getattr__
    raise AttributeError('Attribute {} does not exist.'.format(item))
AttributeError: Attribute TaskUpdateParameters does not exist.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

An identity is removed.

Environment Summary

Windows-10-10.0.19044-SP0, 
Python 3.10.4
Installer: PIP

azure-cli 2.34.1

Extensions:
acrtransfer 1.1.0
application-insights 0.1.15
azure-devops 0.25.0
blueprint 0.3.1
interactive 0.4.5

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional Context

yonzhan commented 2 years ago

route to CXP team

SatishBoddu-MSFT commented 2 years ago

Routing to the service team's attention for further actions!

image

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon, @yugangw-MSFT.

Issue Details
## Describe the bug **Command Name** `az acr task identity remove` **Errors:** ``` The command failed with an unexpected error. Here is the traceback: Attribute TaskUpdateParameters does not exist. Traceback (most recent call last): File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 428, in __getattr__ return self._operations_groups_value[item] KeyError: 'TaskUpdateParameters' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\knack\cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 658, in execute raise ex File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 721, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 692, in _run_job result = cmd_copy(params) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 328, in __call__ return self.handler(*args, **kwargs) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\command_operation.py", line 121, in handler return op(**command_args) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\command_modules\acr\task.py", line 563, in acr_task_identity_remove TaskUpdateParameters = cmd.get_models('TaskUpdateParameters', operation_group='TaskUpdateParameters') File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\commands\__init__.py", line 351, in get_models return self.loader.get_sdk(*attr_args, resource_type=resource_type, mod='models', File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\__init__.py", line 756, in get_sdk return get_sdk(self.cli_ctx, kwargs.pop('resource_type', self._get_resource_type()), File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\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 "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 640, in get_versioned_sdk sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 632, in get_versioned_sdk_path api_version = getattr(api_version, operation_group) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\azure\cli\core\profiles\_shared.py", line 430, in __getattr__ raise AttributeError('Attribute {} does not exist.'.format(item)) AttributeError: Attribute TaskUpdateParameters does not exist. ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - _Put any pre-requisite steps here..._ - `az acr task identity remove -n {} -r {}` ## Expected Behavior An identity is removed. ## Environment Summary ``` Windows-10-10.0.19044-SP0, Python 3.10.4 Installer: PIP azure-cli 2.34.1 Extensions: acrtransfer 1.1.0 application-insights 0.1.15 azure-devops 0.25.0 blueprint 0.3.1 interactive 0.4.5 Dependencies: msal 1.17.0 azure-mgmt-resource 20.0.0 ``` ## Additional Context
Author: stan-sz
Assignees: -
Labels: `Service Attention`, `Container Registry`, `CXP Attention`, `Auto-Assign`
Milestone: -