Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Az role assignment fails #20312

Closed
ghost opened this issue Nov 12, 2021 · 3 comments
Closed

Az role assignment fails #20312

ghost opened this issue Nov 12, 2021 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. RBAC az role
Milestone

Comments

@ghost
Copy link

ghost commented Nov 12, 2021

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az role assignment list

Errors:

The command failed with an unexpected error. Here is the traceback:
'Namespace' object has no attribute '_cmd'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 582, in execute
    parsed_args = self.parser.parse_args(args)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/knack/parser.py", line 260, in parse_args
    return super().parse_args(args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1822, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2046, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2023, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1210, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/parser.py", line 284, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1850, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2064, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 2004, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/Cellar/python@3.9/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/argparse.py", line 1932, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/azure-cli/2.30.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/arm.py", line 357, in __call__
    profile = Profile(cli_ctx=namespace._cmd.cli_ctx)  # pylint: disable=protected-access
AttributeError: 'Namespace' object has no attribute '_cmd'

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 role assignment list --subscription {}

Expected Behavior

Environment Summary

macOS-12.0.1-x86_64-i386-64bit, Darwin 21.1.0
Python 3.9.8
Installer: HOMEBREW

azure-cli 2.30.0

Extensions:
ssh 0.1.6

Additional Context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 12, 2021
@yonzhan yonzhan added the RBAC az role label Nov 12, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Nov 12, 2021
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Nov 12, 2021
@yonzhan yonzhan added this to the Backlog milestone Nov 12, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 12, 2021

@jiasli for awareness

@ghost
Copy link
Author

ghost commented Nov 15, 2021

@yonzhan I thought of reporting back to you that the update available this morning through Homebrew seems to have fixed the issue. Version 2.30.0_1 was available and as soon as I upgraded and ran the same command that triggered the original errors, azcue cli returned the data with no errors. I will keep testing and report back if anything.

@jiasli
Copy link
Member

jiasli commented Nov 16, 2021

This is caused by #20269 and has been fixed by Homebrew/homebrew-core#86758.

@jiasli jiasli closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. RBAC az role
Projects
None yet
Development

No branches or pull requests

2 participants