Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.62k stars 5.04k forks source link

Log Analytics Table List by Workspace results in Unsupported api version - 2022-10-01 #22129

Open hinchliff opened 1 year ago

hinchliff commented 1 year ago

In https://github.com/Azure/azure-sdk-for-python/issues/28161 I opened an issue against the Python SDK. Using the 12.0.0 version of the Python SDK, trying to list the available Log Analytics tables resulted in a NoRegisteredProviderFound exception being thrown.

Message: No registered resource provider found for location 'centralus' and API version '2021-06-01' for type 'workspaces/tables'. The supported api-versions are '2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, australiaeast, australiacentral, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral, australiacentral2, uaecentral, uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia, koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'.

The Python SDK team released an updated version, 13.0.0b6, however this version results in a different error, apparently at the API layer:

Content: Unsupported api version - 2022-10-01

A redacted version of the debug output is behind the cut

``` >>> print(log_analytics_client.tables.list_by_workspace(resource_group_name, workspace_name).next()) 2023-01-10 09:02:11,512 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/****/resourceGroups/****/providers/Microsoft.OperationalInsights/workspaces/****/tables?api-version=REDACTED' Request method: 'GET' Request headers: 'Accept': 'application/json' 'x-ms-client-request-id': '****' 'User-Agent': 'azsdk-python-mgmt-loganalytics/13.0.0b6 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)' 'Authorization': 'REDACTED' No body was attached to the request 2023-01-10 09:02:19,303 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "GET /subscriptions/****/resourceGroups/****/providers/Microsoft.OperationalInsights/workspaces/****/tables?api-version=2022-10-01 HTTP/1.1" 400 36 2023-01-10 09:02:19,304 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 400 Response headers: 'Cache-Control': 'no-cache' 'Pragma': 'no-cache' 'Content-Length': '36' 'Content-Type': 'text/plain; charset=utf-8' 'Expires': '-1' 'Strict-Transport-Security': 'REDACTED' 'X-Content-Type-Options': 'REDACTED' 'Server': 'Microsoft-IIS/10.0, Microsoft-IIS/10.0' 'X-Powered-By': 'REDACTED' 'x-ms-ratelimit-remaining-subscription-reads': '11997' 'x-ms-request-id': '****' 'x-ms-correlation-request-id': 'REDACTED' 'x-ms-routing-request-id': 'REDACTED' 'Date': 'Tue, 10 Jan 2023 14:02:18 GMT' 2023-01-10 09:02:19,304 - azure.mgmt.loganalytics._serialization - DEBUG - Ran into a deserialization error. Ignoring since this is failsafe deserialization Traceback (most recent call last): File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1430, in _deserialize found_value = key_extractor(attr, attr_desc, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1177, in rest_key_extractor return working_data.get(key) AttributeError: 'str' object has no attribute 'get' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1503, in failsafe_deserialize return self(target_obj, data, content_type=content_type) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1375, in __call__ return self._deserialize(target_obj, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1445, in _deserialize raise_with_traceback(DeserializationError, msg, err) File "****/venv/lib/python3.8/site-packages/azure/core/exceptions.py", line 78, in raise_with_traceback raise error.with_traceback(exc_traceback) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1430, in _deserialize found_value = key_extractor(attr, attr_desc, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1177, in rest_key_extractor return working_data.get(key) azure.core.exceptions.DeserializationError: (", AttributeError: 'str' object has no attribute 'get'", 'Unable to deserialize to object: type', AttributeError("'str' object has no attribute 'get'")) Traceback (most recent call last): File "", line 1, in File "****/venv/lib/python3.8/site-packages/azure/core/paging.py", line 128, in __next__ return next(self._page_iterator) File "****/venv/lib/python3.8/site-packages/azure/core/paging.py", line 76, in __next__ self._response = self._get_next(self.continuation_token) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/operations/_tables_operations.py", line 426, in get_next raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Invalid argument' Content: Unsupported api version - 2022-10-01 ```
ghost commented 1 year ago

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

Issue Details
In https://github.com/Azure/azure-sdk-for-python/issues/28161 I opened an issue against the Python SDK. Using the `12.0.0` version of the Python SDK, trying to list the available Log Analytics tables resulted in a NoRegisteredProviderFound exception being thrown. > Message: No registered resource provider found for location 'centralus' and API version '2021-06-01' for type 'workspaces/tables'. The supported api-versions are '2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, australiaeast, australiacentral, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral, australiacentral2, uaecentral, uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia, koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'. The Python SDK team released an updated version, `13.0.0b6`, however this version results in a different error, apparently at the API layer: > Content: Unsupported api version - 2022-10-01 A redacted version of the [debug output](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/debug_guide.md) is behind the cut
``` >>> print(log_analytics_client.tables.list_by_workspace(resource_group_name, workspace_name).next()) 2023-01-10 09:02:11,512 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/****/resourceGroups/****/providers/Microsoft.OperationalInsights/workspaces/****/tables?api-version=REDACTED' Request method: 'GET' Request headers: 'Accept': 'application/json' 'x-ms-client-request-id': '****' 'User-Agent': 'azsdk-python-mgmt-loganalytics/13.0.0b6 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)' 'Authorization': 'REDACTED' No body was attached to the request 2023-01-10 09:02:19,303 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "GET /subscriptions/****/resourceGroups/****/providers/Microsoft.OperationalInsights/workspaces/****/tables?api-version=2022-10-01 HTTP/1.1" 400 36 2023-01-10 09:02:19,304 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 400 Response headers: 'Cache-Control': 'no-cache' 'Pragma': 'no-cache' 'Content-Length': '36' 'Content-Type': 'text/plain; charset=utf-8' 'Expires': '-1' 'Strict-Transport-Security': 'REDACTED' 'X-Content-Type-Options': 'REDACTED' 'Server': 'Microsoft-IIS/10.0, Microsoft-IIS/10.0' 'X-Powered-By': 'REDACTED' 'x-ms-ratelimit-remaining-subscription-reads': '11997' 'x-ms-request-id': '****' 'x-ms-correlation-request-id': 'REDACTED' 'x-ms-routing-request-id': 'REDACTED' 'Date': 'Tue, 10 Jan 2023 14:02:18 GMT' 2023-01-10 09:02:19,304 - azure.mgmt.loganalytics._serialization - DEBUG - Ran into a deserialization error. Ignoring since this is failsafe deserialization Traceback (most recent call last): File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1430, in _deserialize found_value = key_extractor(attr, attr_desc, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1177, in rest_key_extractor return working_data.get(key) AttributeError: 'str' object has no attribute 'get' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1503, in failsafe_deserialize return self(target_obj, data, content_type=content_type) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1375, in __call__ return self._deserialize(target_obj, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1445, in _deserialize raise_with_traceback(DeserializationError, msg, err) File "****/venv/lib/python3.8/site-packages/azure/core/exceptions.py", line 78, in raise_with_traceback raise error.with_traceback(exc_traceback) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1430, in _deserialize found_value = key_extractor(attr, attr_desc, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1177, in rest_key_extractor return working_data.get(key) azure.core.exceptions.DeserializationError: (", AttributeError: 'str' object has no attribute 'get'", 'Unable to deserialize to object: type', AttributeError("'str' object has no attribute 'get'")) Traceback (most recent call last): File "", line 1, in File "****/venv/lib/python3.8/site-packages/azure/core/paging.py", line 128, in __next__ return next(self._page_iterator) File "****/venv/lib/python3.8/site-packages/azure/core/paging.py", line 76, in __next__ self._response = self._get_next(self.continuation_token) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/operations/_tables_operations.py", line 426, in get_next raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Invalid argument' Content: Unsupported api version - 2022-10-01 ```
Author: hinchliff
Assignees: -
Labels: `question`, `Service Attention`, `customer-reported`, `Monitor - LogAnalytics`
Milestone: -
navba-MSFT commented 1 year ago

Adding Service team to look into this.

@AzmonLogA Could you please look into this and provide an update ?

wiperpaul commented 1 year ago

experiencing same issue, had to revert to azure python sdk version azure-mgmt-loganalytics==13.0.0b6 while this is fixed

ghost commented 1 year ago

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

Issue Details
In https://github.com/Azure/azure-sdk-for-python/issues/28161 I opened an issue against the Python SDK. Using the `12.0.0` version of the Python SDK, trying to list the available Log Analytics tables resulted in a NoRegisteredProviderFound exception being thrown. > Message: No registered resource provider found for location 'centralus' and API version '2021-06-01' for type 'workspaces/tables'. The supported api-versions are '2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, australiaeast, australiacentral, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral, australiacentral2, uaecentral, uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia, koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'. The Python SDK team released an updated version, `13.0.0b6`, however this version results in a different error, apparently at the API layer: > Content: Unsupported api version - 2022-10-01 A redacted version of the [debug output](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/debug_guide.md) is behind the cut
``` >>> print(log_analytics_client.tables.list_by_workspace(resource_group_name, workspace_name).next()) 2023-01-10 09:02:11,512 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'https://management.azure.com/subscriptions/****/resourceGroups/****/providers/Microsoft.OperationalInsights/workspaces/****/tables?api-version=REDACTED' Request method: 'GET' Request headers: 'Accept': 'application/json' 'x-ms-client-request-id': '****' 'User-Agent': 'azsdk-python-mgmt-loganalytics/13.0.0b6 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)' 'Authorization': 'REDACTED' No body was attached to the request 2023-01-10 09:02:19,303 - urllib3.connectionpool - DEBUG - https://management.azure.com:443 "GET /subscriptions/****/resourceGroups/****/providers/Microsoft.OperationalInsights/workspaces/****/tables?api-version=2022-10-01 HTTP/1.1" 400 36 2023-01-10 09:02:19,304 - azure.core.pipeline.policies.http_logging_policy - INFO - Response status: 400 Response headers: 'Cache-Control': 'no-cache' 'Pragma': 'no-cache' 'Content-Length': '36' 'Content-Type': 'text/plain; charset=utf-8' 'Expires': '-1' 'Strict-Transport-Security': 'REDACTED' 'X-Content-Type-Options': 'REDACTED' 'Server': 'Microsoft-IIS/10.0, Microsoft-IIS/10.0' 'X-Powered-By': 'REDACTED' 'x-ms-ratelimit-remaining-subscription-reads': '11997' 'x-ms-request-id': '****' 'x-ms-correlation-request-id': 'REDACTED' 'x-ms-routing-request-id': 'REDACTED' 'Date': 'Tue, 10 Jan 2023 14:02:18 GMT' 2023-01-10 09:02:19,304 - azure.mgmt.loganalytics._serialization - DEBUG - Ran into a deserialization error. Ignoring since this is failsafe deserialization Traceback (most recent call last): File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1430, in _deserialize found_value = key_extractor(attr, attr_desc, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1177, in rest_key_extractor return working_data.get(key) AttributeError: 'str' object has no attribute 'get' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1503, in failsafe_deserialize return self(target_obj, data, content_type=content_type) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1375, in __call__ return self._deserialize(target_obj, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1445, in _deserialize raise_with_traceback(DeserializationError, msg, err) File "****/venv/lib/python3.8/site-packages/azure/core/exceptions.py", line 78, in raise_with_traceback raise error.with_traceback(exc_traceback) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1430, in _deserialize found_value = key_extractor(attr, attr_desc, data) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/_serialization.py", line 1177, in rest_key_extractor return working_data.get(key) azure.core.exceptions.DeserializationError: (", AttributeError: 'str' object has no attribute 'get'", 'Unable to deserialize to object: type', AttributeError("'str' object has no attribute 'get'")) Traceback (most recent call last): File "", line 1, in File "****/venv/lib/python3.8/site-packages/azure/core/paging.py", line 128, in __next__ return next(self._page_iterator) File "****/venv/lib/python3.8/site-packages/azure/core/paging.py", line 76, in __next__ self._response = self._get_next(self.continuation_token) File "****/venv/lib/python3.8/site-packages/azure/mgmt/loganalytics/operations/_tables_operations.py", line 426, in get_next raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Invalid argument' Content: Unsupported api version - 2022-10-01 ```
Author: hinchliff
Assignees: -
Labels: `question`, `Monitor`, `Service Attention`, `customer-reported`, `Monitor - LogAnalytics`, `needs-team-attention`
Milestone: -