Azure / azure-cli

Azure Command-Line Interface
MIT License
3.95k stars 2.93k forks source link

az extension add failing with unexpected error #18125

Open mkunze8187 opened 3 years ago

mkunze8187 commented 3 years ago

I am randomly getting the following error from 'az extension add --name application-insights':

az : ERROR: The command failed with an unexpected error. Here is the traceback: At C:\agent02_work_temp\azureclitaskscript1621279845428_inlinescript.ps1:8 char:3

This is running in an AzureCLI@2 task on a self-hosted Azure DevOps agent. This fails about 1 out of 4 times. I have also tried enabling dynamic installation for extensions using the command 'az config set extension.use_dynamic_install=yes_without_prompt --only-show-errors' and then executing a simple 'az monitor app-insights component show --resource-group ' and I get the same error as above.

This is the output using the --debug option: 2021-05-18T13:28:28.8399576Z az : DEBUG: cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'application-insights', '--debug'] 2021-05-18T13:28:28.8403277Z At C:\agent02_work_temp\azureclitaskscript1621344490019_inlinescript.ps1:11 char:1 2021-05-18T13:28:28.8406501Z + az extension add --name application-insights --debug 2021-05-18T13:28:28.8409782Z + ~~~~~~~~~~~~ 2021-05-18T13:28:28.8412768Z + CategoryInfo : NotSpecified: (DEBUG: cli.knac...ts', '--debug']:String) [], RemoteException 2021-05-18T13:28:28.8415734Z + FullyQualifiedErrorId : NativeCommandError 2021-05-18T13:28:28.8474445Z
2021-05-18T13:28:28.8486794Z DEBUG: cli.knack.cli: init debug log: 2021-05-18T13:28:28.8490062Z Cannot enable color. 2021-05-18T13:28:28.8546468Z DEBUG: cli.knack.cli: Event: Cli.PreExecute [] 2021-05-18T13:28:28.8598483Z DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 2021-05-18T13:28:28.8602319Z 0x01ABE618>, <function OutputProducer.on_global_arguments at 0x01B53B28>, <function CLIQuery.on_global_arguments at 2021-05-18T13:28:28.8605162Z 0x01B72A50>] 2021-05-18T13:28:28.8655255Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] 2021-05-18T13:28:28.8707647Z DEBUG: cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension'] 2021-05-18T13:28:28.8770275Z DEBUG: cli.azure.cli.core: Loading command modules: 2021-05-18T13:28:28.8828224Z DEBUG: cli.azure.cli.core: Name Load Time Groups Commands 2021-05-18T13:28:28.8876384Z DEBUG: cli.azure.cli.core: extension 0.007 1 7 2021-05-18T13:28:28.9186798Z DEBUG: cli.azure.cli.core: Total (1) 0.007 1 7 2021-05-18T13:28:28.9236465Z DEBUG: cli.azure.cli.core: Loaded 1 groups, 7 commands. 2021-05-18T13:28:28.9288406Z DEBUG: cli.azure.cli.core: Found a match in the command table. 2021-05-18T13:28:28.9389930Z DEBUG: cli.azure.cli.core: Raw command : extension add 2021-05-18T13:28:28.9441221Z DEBUG: cli.azure.cli.core: Command table: extension add 2021-05-18T13:28:28.9493331Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function 2021-05-18T13:28:28.9496874Z AzCliLogging.init_command_file_logging at 0x020005D0>] 2021-05-18T13:28:28.9557198Z DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 2021-05-18T13:28:28.9562763Z 'C:\agent02_work_temp.azclitask\commands\2021-05-18.13-28-27.extension_add.8876.log'. 2021-05-18T13:28:28.9612796Z INFO: az_command_data_logger: command args: extension add --name {} --debug 2021-05-18T13:28:28.9795780Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function 2021-05-18T13:28:29.0031769Z register_global_subscription_argument..add_subscription_parameter at 0x02045F60>, <function 2021-05-18T13:28:29.0037587Z register_global_query_examples_argument..register_query_examples at 0x020536A8>] 2021-05-18T13:28:29.0084629Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] 2021-05-18T13:28:29.0139809Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function 2021-05-18T13:28:29.0143409Z register_ids_argument..add_ids_arguments at 0x020536F0>, <function 2021-05-18T13:28:29.0167199Z register_cache_arguments..add_cache_arguments at 0x02053780>] 2021-05-18T13:28:29.0273315Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] 2021-05-18T13:28:29.0330686Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] 2021-05-18T13:28:29.0998932Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 2021-05-18T13:28:29.1003096Z 0x01B53B70>, <function CLIQuery.handle_query_parameter at 0x01B72A98>, <function 2021-05-18T13:28:29.1008054Z register_global_query_examples_argument..handle_example_parameter at 0x020530C0>, <function 2021-05-18T13:28:29.1011897Z register_ids_argument..parse_ids_arguments at 0x02053738>] 2021-05-18T13:28:29.1107832Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443 2021-05-18T13:28:29.1168242Z DEBUG: urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0 2021-05-18T13:28:29.1223073Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443 2021-05-18T13:28:29.1273212Z DEBUG: urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 2021-05-18T13:28:29.1276195Z 200 920697 2021-05-18T13:28:29.5048531Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['application_insights-0.1.3-py2.py3-none-any.whl', 2021-05-18T13:28:29.5338879Z 'application_insights-0.1.4-py2.py3-none-any.whl', 'application_insights-0.1.5-py2.py3-none-any.whl', 2021-05-18T13:28:29.5349679Z 'application_insights-0.1.6-py2.py3-none-any.whl', 'application_insights-0.1.7-py2.py3-none-any.whl', 2021-05-18T13:28:29.5353042Z 'application_insights-0.1.8-py2.py3-none-any.whl', 'application_insights-0.1.9-py2.py3-none-any.whl', 2021-05-18T13:28:29.5356890Z 'application_insights-0.1.10-py2.py3-none-any.whl', 'application_insights-0.1.11-py2.py3-none-any.whl', 2021-05-18T13:28:29.5360842Z 'application_insights-0.1.12-py2.py3-none-any.whl', 'application_insights-0.1.13-py2.py3-none-any.whl'] 2021-05-18T13:28:29.5458461Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['application_insights-0.1.3-py2.py3-none-any.whl', 2021-05-18T13:28:29.5462333Z 'application_insights-0.1.4-py2.py3-none-any.whl', 'application_insights-0.1.5-py2.py3-none-any.whl', 2021-05-18T13:28:29.5465965Z 'application_insights-0.1.6-py2.py3-none-any.whl', 'application_insights-0.1.7-py2.py3-none-any.whl', 2021-05-18T13:28:29.5469516Z 'application_insights-0.1.8-py2.py3-none-any.whl', 'application_insights-0.1.9-py2.py3-none-any.whl', 2021-05-18T13:28:29.5473355Z 'application_insights-0.1.10-py2.py3-none-any.whl', 'application_insights-0.1.11-py2.py3-none-any.whl', 2021-05-18T13:28:29.5477493Z 'application_insights-0.1.12-py2.py3-none-any.whl', 'application_insights-0.1.13-py2.py3-none-any.whl'] 2021-05-18T13:28:29.5542015Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['application_insights-0.1.3-py2.py3-none-any.whl', 2021-05-18T13:28:29.5546625Z 'application_insights-0.1.4-py2.py3-none-any.whl', 'application_insights-0.1.5-py2.py3-none-any.whl', 2021-05-18T13:28:29.5577419Z 'application_insights-0.1.6-py2.py3-none-any.whl', 'application_insights-0.1.7-py2.py3-none-any.whl', 2021-05-18T13:28:29.5581050Z 'application_insights-0.1.8-py2.py3-none-any.whl', 'application_insights-0.1.9-py2.py3-none-any.whl', 2021-05-18T13:28:29.5584536Z 'application_insights-0.1.10-py2.py3-none-any.whl', 'application_insights-0.1.11-py2.py3-none-any.whl', 2021-05-18T13:28:29.5588586Z 'application_insights-0.1.12-py2.py3-none-any.whl', 'application_insights-0.1.13-py2.py3-none-any.whl'] 2021-05-18T13:28:29.5654226Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['application_insights-0.1.13-py2.py3-none-any.whl', 2021-05-18T13:28:29.5672386Z 'application_insights-0.1.12-py2.py3-none-any.whl', 'application_insights-0.1.11-py2.py3-none-any.whl', 2021-05-18T13:28:29.5677449Z 'application_insights-0.1.10-py2.py3-none-any.whl', 'application_insights-0.1.9-py2.py3-none-any.whl', 2021-05-18T13:28:29.5681643Z 'application_insights-0.1.8-py2.py3-none-any.whl', 'application_insights-0.1.7-py2.py3-none-any.whl', 2021-05-18T13:28:29.5684842Z 'application_insights-0.1.6-py2.py3-none-any.whl', 'application_insights-0.1.5-py2.py3-none-any.whl', 2021-05-18T13:28:29.5688326Z 'application_insights-0.1.4-py2.py3-none-any.whl', 'application_insights-0.1.3-py2.py3-none-any.whl'] 2021-05-18T13:28:29.5746152Z DEBUG: cli.azure.cli.core.extension._resolve: Choosing the latest of the remaining candidates. 2021-05-18T13:28:29.9490005Z DEBUG: cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 2021-05-18T13:28:29.9493967Z 'https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.13-py2.py3-none-any.whl', 2021-05-18T13:28:29.9499710Z 'filename': 'application_insights-0.1.13-py2.py3-none-any.whl', 'metadata': {'azext.isPreview': True, 2021-05-18T13:28:29.9504836Z 'azext.minCliCoreVersion': '2.0.79', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: 2021-05-18T13:28:29.9509593Z Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: 2021-05-18T13:28:29.9513947Z Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: 2021-05-18T13:28:29.9517899Z Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI 2021-05-18T13:28:29.9521845Z Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': 'aleldeib@microsoft.com', 'name': 2021-05-18T13:28:29.9525632Z 'Ace Eldeib', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 2021-05-18T13:28:29.9530545Z 'https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights'}}}, 'extras': [], 'generator': 2021-05-18T13:28:29.9534811Z 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'application-insights', 'run_requires': 2021-05-18T13:28:29.9538904Z [{'requires': ['isodate (~=0.6.0)']}], 'summary': 'Support for managing Application Insights components and querying 2021-05-18T13:28:29.9543349Z metrics, events, and logs from such components.', 'version': '0.1.13'}, 'sha256Digest': 2021-05-18T13:28:29.9551497Z 'b1d5d31cfbd8a75595943d7248e585d63d0a1c6b43c69febbd7162239af98933'} 2021-05-18T13:28:29.9617972Z DEBUG: cli.azure.cli.core.extension.operations: Extension source is url? True 2021-05-18T13:28:29.9694050Z DEBUG: cli.azure.cli.core.extension.operations: Downloading 2021-05-18T13:28:29.9697806Z https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.13-py2.py3-none-any.whl to 2021-05-18T13:28:29.9701736Z C:\Users\soartfsbuild\AppData\Local\Temp\tmpwb_kpak1\application_insights-0.1.13-py2.py3-none-any.whl 2021-05-18T13:28:29.9754967Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): azurecliprod.blob.core.windows.net:443 2021-05-18T13:28:29.9811370Z DEBUG: urllib3.connectionpool: https://azurecliprod.blob.core.windows.net:443 "GET 2021-05-18T13:28:29.9815619Z /cli-extensions/application_insights-0.1.13-py2.py3-none-any.whl HTTP/1.1" 200 325049 2021-05-18T13:28:30.4651947Z DEBUG: cli.azure.cli.core.extension.operations: Downloaded to 2021-05-18T13:28:30.4780544Z C:\Users\soartfsbuild\AppData\Local\Temp\tmpwb_kpak1\application_insights-0.1.13-py2.py3-none-any.whl 2021-05-18T13:28:30.5861212Z DEBUG: cli.azure.cli.core.extension.operations: Validating the extension 2021-05-18T13:28:30.5940979Z C:\Users\soartfsbuild\AppData\Local\Temp\tmpwb_kpak1\application_insights-0.1.13-py2.py3-none-any.whl 2021-05-18T13:28:30.6799784Z DEBUG: cli.azure.cli.core.extension.operations: Checksum of 2021-05-18T13:28:30.6809149Z C:\Users\soartfsbuild\AppData\Local\Temp\tmpwb_kpak1\application_insights-0.1.13-py2.py3-none-any.whl is OK 2021-05-18T13:28:31.1051031Z DEBUG: cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: 2021-05-18T13:28:31.1353488Z DEBUG: cli.azure.cli.core.util: Traceback (most recent call last): 2021-05-18T13:28:31.1846931Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke 2021-05-18T13:28:31.2571939Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 657, 2021-05-18T13:28:31.2621750Z in execute 2021-05-18T13:28:31.2674885Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 720, 2021-05-18T13:28:31.2678479Z in _run_jobs_serially 2021-05-18T13:28:31.2987533Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 691, 2021-05-18T13:28:31.3736443Z in _run_job 2021-05-18T13:28:31.3746525Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 328, 2021-05-18T13:28:31.3764650Z in call 2021-05-18T13:28:31.3840235Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 807, in 2021-05-18T13:28:31.3842367Z default_command_handler 2021-05-18T13:28:31.3845100Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", 2021-05-18T13:28:31.3846752Z line 18, in add_extension_cmd 2021-05-18T13:28:31.3848218Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.3849994Z 340, in add_extension 2021-05-18T13:28:31.3851464Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.3853115Z 147, in _add_whl_ext 2021-05-18T13:28:31.3854465Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.3855771Z 84, in _validate_whl_extension 2021-05-18T13:28:31.3856920Z File "shutil.py", line 500, in rmtree 2021-05-18T13:28:31.3858037Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.3859245Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.3860403Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.3861606Z File "shutil.py", line 399, in _rmtree_unsafe 2021-05-18T13:28:31.3862769Z File "shutil.py", line 397, in _rmtreeunsafe 2021-05-18T13:28:31.3874591Z OSError: [WinError 145] The directory is not empty: 'C:\Users\soartfsbuild\AppData\Local\Temp\tmpgc4tub9h\azext 2021-05-18T13:28:31.3876602Z applicationinsights\vendored_sdks\applicationinsights' 2021-05-18T13:28:31.3878267Z ERROR: cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback: 2021-05-18T13:28:31.3880219Z ERROR: az_command_data_logger: The command failed with an unexpected error. Here is the traceback: 2021-05-18T13:28:31.3959057Z ERROR: cli.azure.cli.core.azclierror: [WinError 145] The directory is not empty: 'C:\Users\soartfsbuild\AppData\Loc 2021-05-18T13:28:31.3963150Z al\Temp\tmpgc4tub9h\azext_applicationinsights\vendored_sdks\applicationinsights' 2021-05-18T13:28:31.3967817Z Traceback (most recent call last): 2021-05-18T13:28:31.3971266Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke 2021-05-18T13:28:31.3974573Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 657, 2021-05-18T13:28:31.3978389Z in execute 2021-05-18T13:28:31.3982767Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 720, 2021-05-18T13:28:31.3986365Z in _run_jobs_serially 2021-05-18T13:28:31.3989414Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 691, 2021-05-18T13:28:31.3992388Z in _run_job 2021-05-18T13:28:31.3995572Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 328, 2021-05-18T13:28:31.3999179Z in call 2021-05-18T13:28:31.4003685Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 807, in 2021-05-18T13:28:31.4007089Z default_command_handler 2021-05-18T13:28:31.4010329Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", 2021-05-18T13:28:31.4013995Z line 18, in add_extension_cmd 2021-05-18T13:28:31.4017228Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.4020656Z 340, in add_extension 2021-05-18T13:28:31.4023625Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.4028153Z 147, in _add_whl_ext 2021-05-18T13:28:31.4031663Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.4034862Z 84, in _validate_whl_extension 2021-05-18T13:28:31.4037737Z File "shutil.py", line 500, in rmtree 2021-05-18T13:28:31.4040422Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.4043079Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.4046242Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.4049137Z File "shutil.py", line 399, in _rmtree_unsafe 2021-05-18T13:28:31.4051973Z File "shutil.py", line 397, in _rmtreeunsafe 2021-05-18T13:28:31.4054861Z OSError: [WinError 145] The directory is not empty: 'C:\Users\soartfsbuild\AppData\Local\Temp\tmpgc4tub9h\azext 2021-05-18T13:28:31.4058057Z applicationinsights\vendored_sdks\applicationinsights' 2021-05-18T13:28:31.4177096Z ERROR: az_command_data_logger: [WinError 145] The directory is not empty: 'C:\Users\soartfsbuild\AppData\Local\Tem 2021-05-18T13:28:31.4179092Z p\tmpgc4tub9h\azext_applicationinsights\vendored_sdks\applicationinsights' 2021-05-18T13:28:31.4182215Z Traceback (most recent call last): 2021-05-18T13:28:31.4187052Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke 2021-05-18T13:28:31.4188613Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 657, 2021-05-18T13:28:31.4191591Z in execute 2021-05-18T13:28:31.4194947Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 720, 2021-05-18T13:28:31.4197790Z in _run_jobs_serially 2021-05-18T13:28:31.4200893Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 691, 2021-05-18T13:28:31.4204247Z in _run_job 2021-05-18T13:28:31.4207639Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 328, 2021-05-18T13:28:31.4210198Z in call 2021-05-18T13:28:31.4212640Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 807, in 2021-05-18T13:28:31.4215120Z default_command_handler 2021-05-18T13:28:31.4217692Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", 2021-05-18T13:28:31.4220369Z line 18, in add_extension_cmd 2021-05-18T13:28:31.4223450Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.4497057Z 340, in add_extension 2021-05-18T13:28:31.4503686Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.4505384Z 147, in _add_whl_ext 2021-05-18T13:28:31.4508583Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 2021-05-18T13:28:31.4512508Z 84, in _validate_whl_extension 2021-05-18T13:28:31.4515215Z File "shutil.py", line 500, in rmtree 2021-05-18T13:28:31.4518209Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.4522108Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.4525205Z File "shutil.py", line 390, in _rmtree_unsafe 2021-05-18T13:28:31.4528393Z File "shutil.py", line 399, in _rmtree_unsafe 2021-05-18T13:28:31.4531842Z File "shutil.py", line 397, in _rmtreeunsafe 2021-05-18T13:28:31.4535590Z OSError: [WinError 145] The directory is not empty: 'C:\Users\soartfsbuild\AppData\Local\Temp\tmpgc4tub9h\azext 2021-05-18T13:28:31.4538739Z applicationinsights\vendored_sdks\applicationinsights' 2021-05-18T13:28:31.4646800Z To open an issue, please run: 'az feedback' 2021-05-18T13:28:31.4648411Z DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x020006F0>] 2021-05-18T13:28:31.4703301Z INFO: az_command_data_logger: exit code: 1 2021-05-18T13:28:31.4754765Z INFO: cli.main: Command ran in 4.218 seconds (init: 0.509, invoke: 3.708) 2021-05-18T13:28:31.4821894Z INFO: telemetry.save: Save telemetry record of length 6460 in cache 2021-05-18T13:28:31.4877426Z WARNING: telemetry.check: Negative: The C:\agent02_work_temp.azclitask\telemetry.txt was modified at 2021-05-18 2021-05-18T13:28:31.4878695Z 13:28:17.244357, which in less than 600.000000 s

When executing this on my desktop, I have no issues.

AzDO Agent is running Windows Server 2016 AZ versions:
"azure-cli": "2.22.0", "azure-cli-core": "2.22.0", "azure-cli-telemetry": "1.0.6", Powershell version: 5.1.17763.1007


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

yonzhan commented 3 years ago

extensions

benjamin-goldman commented 3 years ago

Quick question: how is fixing what is clearly a bug a "feature-request" now?