Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

az resource update --set tags throw an error "cli.azure.cli.core.azclierror: Error occurred in deserializing the response body." #18570

Open ovidiu10 opened 3 years ago

ovidiu10 commented 3 years ago

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

az version 2.25.0

Describe the bug

running az resource update --set tags.'Application'='App1' --ids /subscriptions/****/resourceGroups/rg/providers/Microsoft.Sql/servers/otsql1/databases/otdbsql1 Error occurred in deserializing the response body.

To Reproduce just run the command

Expected behavior no error in return

Environment summary $ az --version azure-cli 2.25.0 core 2.25.0 telemetry 1.0.6 Extensions: aks-preview 0.5.12 resource-graph 2.0.0 Python location '\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory '.azure\cliextensions' Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)]

Additional context cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: <?xml version="1.0" encoding="utf-8"?>https://management.eastus2.control.data base.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/azureAsyncOperation/c930aeda-0305-41a7-89e8-697316c399a9<cat egory term="Microsoft.SqlServer.Management.Service.Domain.ArmResourceProvider.AzureAsyncOperationResource" scheme="http://schemas.microsoft. com/ado/2007/08/dataservices/scheme" /><updated>2021-06-21T20:12:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d: operationId m:type="Edm.Guid">c930aeda-0305-41a7-89e8-697316c399a9</d:operationId><d:status>Succeeded</d:status><d:error m:type="Microsoft.S qlServer.Management.Service.Domain.ArmResourceProvider.AzureAsyncOperationResource_ErrorInfo" m:null="true" /></m:properties></content></ent ry> cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 95, in _as_json File "json__init__.py", line 357, in loads File "json\decoder.py", line 337, in decode File "json\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)</p> <p>During handling of the above exception, another exception occurred:</p> <p>Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/<strong>init</strong>.py", line 657, in execute File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/<strong>init</strong>.py", line 720, in _run_jobs_serially File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/<strong>init</strong>.py", line 691, in _run_job File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/<strong>init</strong>.py", line 328, in <strong>call</strong> File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 253, in handler File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 255, in result File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 83, in wrapper_use_tracer File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 275, in wait File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 192, in _start File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 482, in run File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 518, in _poll File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 561, in update_status File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 261, in get_status File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 97, in _as_json azure.core.exceptions.DecodeError: Error occurred in deserializing the response body.</p> <p>cli.azure.cli.core.azclierror: Error occurred in deserializing the response body. az_command_data_logger: Error occurred in deserializing the response body. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x03C40100>]</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/yonzhan"><img src="https://avatars.githubusercontent.com/u/54048360?v=4" />yonzhan</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>ARM</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ovidiu10"><img src="https://avatars.githubusercontent.com/u/6494381?v=4" />ovidiu10</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>thanks @yonzhan </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/zhoxing-ms"><img src="https://avatars.githubusercontent.com/u/16612065?v=4" />zhoxing-ms</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>@ovidiu10 Could you please add parameter <code>--debug</code> after the executed command and run it, then please send me the printed information by email. My email address is Zhou.Xing@microsoft.com, thanks~</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ylashin"><img src="https://avatars.githubusercontent.com/u/2197158?v=4" />ylashin</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>More context on how to reproduce:</p> <ul> <li>Try to apply tags on an Azure SQL database</li> <li><code>az resource tag --tags "CostCenter=Test" --ids $ResourceId --debug</code></li> <li>You will find one of the REST calls returning XML instead of JSON</li> <li>That REST call is <code>https://management.azure.com:443/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Sql/servers/<SqlServerName>/databases/<DatabaseName>/azureAsyncOperation/<SOME-GUID>?api-version=2014-04-01-Preview</code></li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/zhoxing-ms"><img src="https://avatars.githubusercontent.com/u/16612065?v=4" />zhoxing-ms</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>Yes, thanks for your information, I can reproduce this problem.</p> <blockquote> <p>You will find one of the REST calls returning XML instead of JSON</p> </blockquote> <p>This problem is really caused by this, so it should be a service issue, it needs to be investigated by the service team~</p> <p><strong>correlation-id: '9fbc8b74-99cf-41ec-955c-f5052360f792'</strong></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ghost"><img src="https://avatars.githubusercontent.com/u/10137?v=4" />ghost</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.</p> <details> <summary>Issue Details</summary> <hr /> > ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62 az version 2.25.0 **Describe the bug** <!--- A clear and concise description of what the bug is. ---> running az resource update --set tags.'Application'='App1' --ids /subscriptions/********/resourceGroups/rg/providers/Microsoft.Sql/servers/otsql1/databases/otdbsql1 Error occurred in deserializing the response body. **To Reproduce** just run the command **Expected behavior** no error in return **Environment summary** $ az --version azure-cli 2.25.0 core 2.25.0 telemetry 1.0.6 Extensions: aks-preview 0.5.12 resource-graph 2.0.0 Python location '\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory '\.azure\cliextensions' Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)] **Additional context** cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: <?xml version="1.0" encoding="utf-8"?><entry xml:base="https://management.eastus2.control.database.windows. net/v2/ManagementService.Trusted.svc/modules/ServerManagement/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ad o/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://management.eastus2.control.data base.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/azureAsyncOperation/c930aeda-0305-41a7-89e8-697316c399a9</id><cat egory term="Microsoft.SqlServer.Management.Service.Domain.ArmResourceProvider.AzureAsyncOperationResource" scheme="http://schemas.microsoft. com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="AzureAsyncOperationResource" href="azureAsyncOperation/c930aeda-0305-41a7-89e 8-697316c399a9" /><title /><updated>2021-06-21T20:12:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d: operationId m:type="Edm.Guid">c930aeda-0305-41a7-89e8-697316c399a9</d:operationId><d:status>Succeeded</d:status><d:error m:type="Microsoft.S qlServer.Management.Service.Domain.ArmResourceProvider.AzureAsyncOperationResource_ErrorInfo" m:null="true" /></m:properties></content></ent ry> cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 95, in _as_json File "json\__init__.py", line 357, in loads File "json\decoder.py", line 337, in decode File "json\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 657, in execute File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 691, in _run_job File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, in __call__ File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 253, in handler File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 255, in result File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 83, in wrapper_use_tracer File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 275, in wait File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 192, in _start File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 482, in run File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 518, in _poll File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 561, in update_status File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 261, in get_status File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 97, in _as_json azure.core.exceptions.DecodeError: Error occurred in deserializing the response body. cli.azure.cli.core.azclierror: Error occurred in deserializing the response body. az_command_data_logger: Error occurred in deserializing the response body. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x03C40100>] <table> <tr> <th align="left">Author:</th> <td>ovidiu10</td> </tr> <tr> <th align="left">Assignees:</th> <td>zhoxing-ms</td> </tr> <tr> <th align="left">Labels:</th> <td> `OKR3.2 Candidate`, `SQL`, `Service Attention`, `feature-request` </td> </tr> <tr> <th align="left">Milestone:</th> <td>S189</td> </tr> </table> </details> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>