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 servicebus georecovery-alias list fails if there are no aliases avaliable. #25458

Closed
vilit1 opened this issue Feb 14, 2023 · 9 comments
Closed
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-team-attention This issue needs attention from Azure service team or SDK team Service Attention This issue is responsible by Azure service team. Service Bus az servicebus

Comments

@vilit1
Copy link
Contributor

vilit1 commented Feb 14, 2023

This is autogenerated. Please review and update as needed.

Describe the bug

This occurs with az servicebus georecovery-alias list if there are no aliases avaliable. For example, if you run this command with a standard or basic servicebus namespace.

Command Name
az servicebus georecovery-alias list

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "C:\repo\venv38\lib\site-packages\knack\cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "c:\repo\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 658, in execute
    raise ex
  File "c:\repo\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "c:\repo\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 705, in _run_job
    result = list(result)
  File "C:\repo\extensions\azure-iot\azure\core\paging.py", line 132, in __next__
    return next(self._page_iterator)
  File "C:\repo\extensions\azure-iot\azure\core\paging.py", line 84, in __next__
    self.continuation_token, self._current_page = self._extract_data(self._response)
  File "C:\repo\venv38\lib\site-packages\azure\mgmt\servicebus\operations\_disaster_recovery_configs_operations.py", line 172, in extract_data
    return deserialized.next_link or None, iter(list_of_elem)
TypeError: 'NoneType' object is not iterable

To Reproduce:

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

  • Create a Standard servicebus namespace
  • az servicebus georecovery-alias list --namespace-name {} -g {}

Expected Behavior

Environment Summary

Windows-10-10.0.22621-SP0
Python 3.8.3
Installer: PIP

azure-cli 2.32.0 *

Extensions:
azure-iot 255.255.1.2

Dependencies:
msal 1.21.0
azure-mgmt-resource 20.0.0

Additional Context

@ghost ghost added Auto-Assign Auto assign by bot Service Bus az servicebus CXP Attention This issue is handled by CXP team. labels Feb 14, 2023
@vilit1
Copy link
Contributor Author

vilit1 commented Feb 14, 2023

This is most likely the same paging issue as here #18866

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 14, 2023

route to CXP team

@navba-MSFT navba-MSFT self-assigned this Feb 28, 2023
@navba-MSFT
Copy link
Contributor

@vilit1 Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.

@navba-MSFT
Copy link
Contributor

navba-MSFT commented Feb 28, 2023

@vilit1 Could you please run the below command and test ?

az rest --url "https://management.azure.com/subscriptions/{subID}/resourceGroups/{RG}/providers/Microsoft.ServiceBus/namespaces/{SBNamespace}/disasterRecoveryConfigs?api-version=2022-01-01-preview"

PS: Update your Subscription ID, RG Name and SB namespace in the placeholder.

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Feb 28, 2023
@vilit1
Copy link
Contributor Author

vilit1 commented Feb 28, 2023

First call is to a servicebus that has a disaster recovery config and the second is to one that does not
image

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Feb 28, 2023
@navba-MSFT navba-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 2, 2023
@navba-MSFT
Copy link
Contributor

navba-MSFT commented Mar 2, 2023

@vilit1 We had a discussion over teams internally. You have confirmed that the az rest and az resource show command does help. However, your ask is particularly regarding the az servicebus georecovery-alias list CLI command.

The failure is occurring in this function: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/v2022_10_01_preview/operations/_disaster_recovery_configs_operations.py#L511

Since this is Code is generated by AutoRest Code Generator. I am adding the Service team to look into this further.

@navba-MSFT navba-MSFT removed their assignment Mar 2, 2023
@navba-MSFT navba-MSFT added Service Attention This issue is responsible by Azure service team. and removed CXP Attention This issue is handled by CXP team. labels Mar 2, 2023
@ghost
Copy link

ghost commented Mar 2, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Saglodha.

Issue Details

This is autogenerated. Please review and update as needed.

Describe the bug

This occurs with az servicebus georecovery-alias list if there are no aliases avaliable. For example, if you run this command with a standard or basic servicebus namespace.

Command Name
az servicebus georecovery-alias list

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "C:\repo\venv38\lib\site-packages\knack\cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "c:\repo\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 658, in execute
    raise ex
  File "c:\repo\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "c:\repo\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 705, in _run_job
    result = list(result)
  File "C:\repo\extensions\azure-iot\azure\core\paging.py", line 132, in __next__
    return next(self._page_iterator)
  File "C:\repo\extensions\azure-iot\azure\core\paging.py", line 84, in __next__
    self.continuation_token, self._current_page = self._extract_data(self._response)
  File "C:\repo\venv38\lib\site-packages\azure\mgmt\servicebus\operations\_disaster_recovery_configs_operations.py", line 172, in extract_data
    return deserialized.next_link or None, iter(list_of_elem)
TypeError: 'NoneType' object is not iterable

To Reproduce:

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

  • Create a Standard servicebus namespace
  • az servicebus georecovery-alias list --namespace-name {} -g {}

Expected Behavior

Environment Summary

Windows-10-10.0.22621-SP0
Python 3.8.3
Installer: PIP

azure-cli 2.32.0 *

Extensions:
azure-iot 255.255.1.2

Dependencies:
msal 1.21.0
azure-mgmt-resource 20.0.0

Additional Context

Author: vilit1
Assignees: -
Labels:

bug, Service Attention, Service Bus, needs-team-attention, Auto-Assign

Milestone: -

@Saglodha
Copy link

Hi @vilit1 , we are working on the issue and having internal investigation. I would come back soon with fresh updates. Thanks for your co-operation.

@schaudhari6254888
Copy link
Contributor

Hey @vilit1 , this bug is fixed now. you can try the command now. when list is empty it will through a empty array.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-team-attention This issue needs attention from Azure service team or SDK team Service Attention This issue is responsible by Azure service team. Service Bus az servicebus
Projects
None yet
Development

No branches or pull requests

5 participants