Azure / Azure/azure-cli-extensions

rdbms-connect install fails with pip status code

Open
#7,182 2 comments 0 reactions 0 assignees View on GitHub
customer-reported question Service Attention SQL
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

Trying to install the rdbms-connect extension fails and returns pip failed with status code 2. By running the above command with the --debug flag I saw that "An error occurred. Pip failed with status code 2"

### Related command

az extension add --name rdbms-connect --debug

### Errors

File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 173, in _add_whl_ext
knack.util.CLIError: An error occurred. Pip failed with status code 2. Use --debug for more information.

cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 2. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 2. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 22.813 seconds (init: 0.971, invoke: 21.842)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3398 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc

### Issue script & Debug output

PS C:\Users\GenAITCGTest> az extension add --name rdbms-connect --debug
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'rdbms-connect', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: extension 0.006 1 7
cli.azure.cli.core: Total (1) 0.006 1 7
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\GenAITCGTest\.azure\commands\2024-01-10.10-11-04.extension_add.11640.log'.
az_command_data_logger: command args: extension add --name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x0000019CEC2502C0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x0000019CEC250360>, .add_cache_arguments at 0x0000019CEC2504A0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x0000019CEC250400>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 3583033
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-0.1.0-py2.py3-none-any.whl', 'rdbms_connect-0.1.1-py2.py3-none-any.whl', 'rdbms_connect-0.1.2-py2.py3-none-any.whl', 'rdbms_connect-0.1.3-py2.py3-none-any.whl', 'rdbms_connect-0.1.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.0-py2.py3-none-any.whl', 'rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-0.1.0-py2.py3-none-any.whl', 'rdbms_connect-0.1.1-py2.py3-none-any.whl', 'rdbms_connect-0.1.2-py2.py3-none-any.whl', 'rdbms_connect-0.1.3-py2.py3-none-any.whl', 'rdbms_connect-0.1.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.0-py2.py3-none-any.whl', 'rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-0.1.0-py2.py3-none-any.whl', 'rdbms_connect-0.1.1-py2.py3-none-any.whl', 'rdbms_connect-0.1.2-py2.py3-none-any.whl', 'rdbms_connect-0.1.3-py2.py3-none-any.whl', 'rdbms_connect-0.1.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.0-py2.py3-none-any.whl', 'rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-0.1.0-py2.py3-none-any.whl', 'rdbms_connect-0.1.1-py2.py3-none-any.whl', 'rdbms_connect-0.1.2-py2.py3-none-any.whl', 'rdbms_connect-0.1.3-py2.py3-none-any.whl', 'rdbms_connect-0.1.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.0-py2.py3-none-any.whl', 'rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://azcliprod.blob.core.windows.net/cli-extensions/rdbms_connect-1.0.4-py2.py3-none-any.whl', 'filename': 'rdbms_connect-1.0.4-py2.py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.19.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': 'azpycli@microsoft.com', 'name': 'Microsoft Corporation', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Azure/azure-cli-extensions/tree/main/src/rdbms-connect'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'rdbms-connect', 'run_requires': [{'requires': ['mycli (==1.26.1)', 'pgcli (==3.4.1)', 'psycopg2 (==2.9.3)', 'setproctitle (~=1.2.2)']}], 'summary': 'Support for testing connection to Azure Database for MySQL & PostgreSQL servers.', 'version': '1.0.4'}, 'sha256Digest': '8dc15a70881c71f21ba000854960b1be851a057b403dc8de156b73883efb543d'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://azcliprod.blob.core.windows.net/cli-extensions/rdbms_connect-1.0.4-py2.py3-none-any.whl to C:\Users\GENAIT~1\AppData\Local\Temp\tmppqsfka5w\rdbms_connect-1.0.4-py2.py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): azcliprod.blob.core.windows.net:443
urllib3.connectionpool: https://azcliprod.blob.core.windows.net:443 "GET /cli-extensions/rdbms_connect-1.0.4-py2.py3-none-any.whl HTTP/1.1" 200 12935
cli.azure.cli.core.extension.operations: Downloaded to C:\Users\GENAIT~1\AppData\Local\Temp\tmppqsfka5w\rdbms_connect-1.0.4-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension C:\Users\GENAIT~1\AppData\Local\Temp\tmppqsfka5w\rdbms_connect-1.0.4-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of C:\Users\GENAIT~1\AppData\Local\Temp\tmppqsfka5w\rdbms_connect-1.0.4-py2.py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on C:\Users\GENAIT~1\AppData\Local\Temp\tmppqsfka5w\rdbms_connect-1.0.4-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', 'C:\\Users\\GenAITCGTest\\.azure\\cliextensions\\rdbms-connect', 'C:\\Users\\GENAIT~1\\AppData\\Local\\Temp\\tmppqsfka5w\\rdbms_connect-1.0.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Running: ['C:\\Program Files\\Microsoft SDKs\\Azure\\CLI2\\python.exe', '-m', 'pip', 'install', '--target', 'C:\\Users\\GenAITCGTest\\.azure\\cliextensions\\rdbms-connect', 'C:\\Users\\GENAIT~1\\AppData\\Local\\Temp\\tmppqsfka5w\\rdbms_connect-1.0.4-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Using pip 23.3.1 from C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip (python 3.11)
Non-user install due to --prefix or --target option
Created temporary directory: C:\Users\GenAITCGTest\AppData\Local\Temp\pip-target-xxv3c42q
Created temporary directory: C:\Users\GenAITCGTest\AppData\Local\Temp\pip-build-tracker-bx2rchy9
Initialized build tracking at C:\Users\GenAITCGTest\AppData\Local\Temp\pip-build-tracker-bx2rchy9
Created build tracker: C:\Users\GenAITCGTest\AppData\Local\Temp\pip-build-tracker-bx2rchy9
Entered build tracker: C:\Users\GenAITCGTest\AppData\Local\Temp\pip-build-tracker-bx2rchy9
Created temporary directory: C:\Users\GenAITCGTest\AppData\Local\Temp\pip-install-359ba27y
Created temporary directory: C:\Users\GenAITCGTest\AppData\Local\Temp\pip-ephem-wheel-cache-djqcjnf3
Processing c:\users\genait~1\appdata\local\temp\tmppqsfka5w\rdbms_connect-1.0.4-py2.py3-none-any.whl
1 location(s) to search for versions of setproctitle:
* https://pypi.org/simple/setproctitle/
Fetching project page and analyzing links: https://pypi.org/simple/setproctitle/
Getting page https://pypi.org/simple/setproctitle/
Found index url https://pypi.org/simple/
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/setproctitle/ HTTP/1.1" 200 44441
Fetched page https://pypi.org/simple/setproctitle/ as application/vnd.pypi.simple.v1+json
Found link https://files.pythonhosted.org/packages/ad/b7/3650003fd5c221b0448099585894cfffed42b6c616ea728e007fb9012247/setproctitle-0.1.tar.gz (from https://pypi.org/simple/setproctitle/), version: 0.1
Found link https://files.pythonhosted.org/packages/c5/3f/59ccd1b99d17b855045cf3a996c673deaf088c0f80f1a2d38f22e31e0acd/setproctitle-0.2.tar.gz (from https://pypi.org/simple/setproctitle/), version: 0.2
Found link https://files.pythonhosted.org/packages/f5/37/7f88031f1250471a2012435967b4124c12c709d7e9aaf551ed5aa2b8b647/setproctitle-0.3.tar.gz (from https://pypi.org/simple/setproctitle/), version: 0.3
Found link https://files.pythonhosted.org/packages/32/f2/2846f72220df83d17c6e6fbc1cf4cc3f54095319e6a1a19c10d3cb075ee9/setproctitle-0.4.tar.gz (from https://pypi.org/simple/setproctitle/), version: 0.4
Found link https://files.pythonhosted.org/packages/14/13/ab029e5356190c00b8960be2efbe16299fa943271da2a3d3e7db34bac210/setproctitle-0.4.zip (from https://pypi.org/simple/setproctitle/), version: 0.4
[az logs.txt](https://github.com/Azure/azure-cli-extensions/files/13937959/az.logs.txt)
[az logs.txt](https://github.com/Azure/azure-cli-extensions/files/13937963/az.logs.txt)
https://files.pythonhosted.org/packages/e6/5a/5ecf97fe50b16c45f77dbd998a0ab00b7b48b4318546d39f0b43a7965ffc/setproctitle-1.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-manylinux2014_ppc64le, cp310-cp310-manylinux_2_17_ppc64le) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/2a/23/310e07e69178a4c2e061771077a07dcae401113e58d1daca9a23dfcab866/setproctitle-1.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-manylinux1_i686, cp310-cp310-manylinux2014_i686, cp310-cp310-manylinux_2_17_i686, cp310-cp310-manylinux_2_5_i686) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/af/43/7587503f48872a654389df63c9ddeb23381994420baab09b9e06b12bae7b/setproctitle-1.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-manylinux1_x86_64, cp310-cp310-manylinux2014_x86_64, cp310-cp310-manylinux_2_17_x86_64, cp310-cp310-manylinux_2_5_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/9c/43/fc59ccbe3cd08507ab0e4a9aba3b4e98a2fd908228eed5af1eaa8fbcad22/setproctitle-1.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-musllinux_1_1_aarch64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/ff/fe/b8ead3173e1eecebf36633ae59e625d8f2e156cfe981c984a74e5fdc2ba6/setproctitle-1.3.0-cp310-cp310-musllinux_1_1_aarch64.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-musllinux_1_1_i686) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/25/fd/d253098fa126dc8a9fdd1e0960dc9fb2f3c6a42dafe9cc223db1c07faf9b/setproctitle-1.3.0-cp310-cp310-musllinux_1_1_i686.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-musllinux_1_1_ppc64le) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/42/06/74fde01f777eb83f707555c6a2866cf00bff6c49e8774b532042c86aa8b8/setproctitle-1.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-musllinux_1_1_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/ad/42/1db547f0c325e3d0a7e64668280cc7f4a9c87874bc28a487c5132fb91be8/setproctitle-1.3.0-cp310-cp310-musllinux_1_1_x86_64.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-win32) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/66/cd/de5343099634dc12fdd43903a9f82d2d37f364f3738790d2c9aaf0c61942/setproctitle-1.3.0-cp310-cp310-win32.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp310-cp310-win_amd64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/7e/a6/948cdd82a28104b9039a99b92c43d58e7221ab978fc6ec5edb5346b6ad4e/setproctitle-1.3.0-cp310-cp310-win_amd64.whl (from https://pypi.org/simple/setproctitle/) (requires-python:>=3.7)
Skipping link: none of the wheel's tags (cp37-cp37m-macosx_10_9_x86_64) are compatible (run pip debug --verbose to show compatible tags):

cli.azure.cli.core.extension.operations: Command '['C:\\Program Files\\Microsoft SDKs\\Azure\\CLI2\\python.exe', '-m', 'pip', 'install', '--target', 'C:\\Users\\GenAITCGTest\\.azure\\cliextensions\\rdbms-connect', 'C:\\Users\\GENAIT~1\\AppData\\Local\\Temp\\tmppqsfka5w\\rdbms_connect-1.0.4-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 2.
cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at C:\Users\GenAITCGTest\.azure\cliextensions\rdbms-connect
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", line 16, in add_extension_cmd
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 344, in add_extension
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 173, in _add_whl_ext
knack.util.CLIError: An error occurred. Pip failed with status code 2. Use --debug for more information.

cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 2. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 2. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 30.813 seconds (init: 1.878, invoke: 28.934)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3398 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc C:\Users\GenAITCGTest\.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

### Expected behavior

An error occurred. Pip failed with status code

### Environment Summary

PS C:\Users\GenAITCGTest> az --version
azure-cli 2.55.0 *

core 2.55.0 *
telemetry 1.1.0

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\GenAITCGTest\.azure\cliextensions'

Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

### Additional context

Because of this error I'm unable to run Self-hosted agent which is installed on VM through Azure DevOps Pipelines.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.