Open tberreis opened 2 days ago
Thank you for opening this issue, we will look into it.
I can confirm the same error on an M2 Mac installed from Homebrew:
❯ az postgres flexible-server list
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/command_modules/rdbms/flexible_server_custom_common.py", line 49, in server_list_custom_func
if (not check_resource_group(resource_group_name)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.66.0/libexec/lib/python3.12/site-packages/azure/cli/command_modules/rdbms/validators.py", line 816, in check_resource_group
resource_group_name = resource_group_name.replace("'", '')
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'
Fix will be included in next release. Thank you so much for bringing this our attention.
Describe the bug
After upgrading the CLI from 2.65.0 to 2.66.0 I'm no longer able to list my postgres flex instances. With 2.65.0 everything worked fine.
The error is reproducible with Linux, WSL and Windows.
Related command
az postgres flexible-server list
Errors
Issue script & Debug output
Expected behavior
List of postgres flexbile server instances (or empty list)
Environment Summary
azure-cli 2.66.0
core 2.66.0 telemetry 1.1.0
Extensions: managementpartner 0.1.3
Dependencies: msal 1.31.0 azure-mgmt-resource 23.1.1
Additional context
No response