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

Create network connection using devcenter CLI command fails using only the required parameters #6280

Closed
russd2357 opened this issue May 12, 2023 · 5 comments
Assignees
Labels
CXP Attention This issue is handled by CXP team. Dev Box needs-author-feedback More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@russd2357
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Attempting to create a network connection using devcenter CLI command fails using only the required parameters in the documentation.

Command Name
az devcenter admin network-connection create -g rdepina-cloudshell -n nc-devcenter -l eastus Extension Name: devcenter. Version: 0.1.2.

Errors:

The command failed with an unexpected error. Here is the traceback:
cannot import name 'Request' from partially initialized module 'requests.models' (most likely due to a circular import) (/opt/az/lib/python3.10/site-packages/requests/models.py)
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 707, in _run_job
    if _is_poller(result):
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 1156, in _is_poller
    return isinstance(obj, poller_classes())
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/util.py", line 686, in poller_classes
    from msrestazure.azure_operation import AzureOperationPoller
  File "/opt/az/lib/python3.10/site-packages/msrestazure/__init__.py", line 28, in <module>
    from .azure_configuration import AzureConfiguration
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_configuration.py", line 34, in <module>
    from msrest import Configuration
  File "/opt/az/lib/python3.10/site-packages/msrest/__init__.py", line 28, in <module>
    from .configuration import Configuration
  File "/opt/az/lib/python3.10/site-packages/msrest/configuration.py", line 37, in <module>
    from .pipeline import Pipeline
  File "/opt/az/lib/python3.10/site-packages/msrest/pipeline/__init__.py", line 52, in <module>
    from requests.structures import CaseInsensitiveDict
  File "/opt/az/lib/python3.10/site-packages/requests/__init__.py", line 135, in <module>
    from .models import Request, Response, PreparedRequest
ImportError: cannot import name 'Request' from partially initialized module 'requests.models' (most likely due to a circular import) (/opt/az/lib/python3.10/site-packages/requests/models.py)

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 devcenter admin network-connection create -g {} -n {} -l {}

Expected Behavior

Network connection would be created

Environment Summary

Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.3 LTS
Python 3.10.10
Installer: DEB

azure-cli 2.48.1

Extensions:
account 0.2.5
azure-devops 0.26.0
devcenter 0.1.2
dns-resolver 0.2.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional Context

@yonzhan
Copy link
Collaborator

yonzhan commented May 12, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added the CXP Attention This issue is handled by CXP team. label May 12, 2023
@ghost
Copy link

ghost commented May 12, 2023

Thank you for your feedback. This has been routed to the support team for assistance.

@jsntcy jsntcy added the Dev Box label May 15, 2023
@navba-MSFT navba-MSFT self-assigned this May 15, 2023
@navba-MSFT
Copy link
Contributor

@russd2357 Thanks for reaching out to us and reporting this issue. Could you please follow the below action plan and check if that resolves your issue ?

pip install --upgrade requests

This ensures that you have the most recent bug fixes and improvements for the requests library.

@navba-MSFT navba-MSFT added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-author-feedback More information is needed from author to address the issue. labels May 15, 2023
@jsntcy
Copy link
Member

jsntcy commented May 15, 2023

Duplicate with Azure/azure-cli#26272.
If the issue still exists, please refer to the workaround in Azure/azure-cli#26272 (comment)

@navba-MSFT
Copy link
Contributor

@russd2357 The fix will be provided in May release. See milestone: https://github.com/Azure/azure-cli/milestone/130

Until fix is released, refer the workaround: Azure/azure-cli#26272 (comment)

Closing this issue as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CXP Attention This issue is handled by CXP team. Dev Box needs-author-feedback More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants