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

Python Azure SDK/azure.mgmt.resourcegraph|azure.mgmt.resource | JSON is invalid: Unterminated string error #39400

Open
msyyc opened this issue Jan 26, 2025 · 1 comment
Assignees
Labels
Mgmt This issue is related to a management-plane library.

Comments

@msyyc
Copy link
Member

msyyc commented Jan 26, 2025

  • Package Name: azure-mgmt-resourcegraph / azure-mgmt-resource
  • Package Version: 8.0.0 / 23.2.0
  • Operating System:
  • Python Version: 3.11

Describe the bug
The customer uses the Azure Python API to gather information about resources in Azure. They gather information from all their subscriptions, so the error happened with resources from multiple subscriptions. Most of the time, the collections succeed with no errors, but intermittently an error like the below will occur. It seems to happen randomly, and when the same request is retried, it will succeed without error.

They have an automatic retry method in place, but multiple times now the number of errors has exceeded their tool's allowed retries causing the data collection to fail. When this occurs, it is because this issue is occurring in enough separate requests that it exceeds our retry threshold. When the requests are retried, they succeed the second time. Instead of continuing to increase our allowed retries we would like to figure out the underlying issue to see if it is solvable.

To Reproduce
Steps to reproduce the behavior:

The errors have occurred when querying Resource Graph using the following method:
ResourceGraphClient.resources(QueryRequest),
and when listing resources with Resource Management using the following method:
ResourceManagementClient.resources.list().

Expected behavior
API succeeds without execption.

Screenshots

Image

Additional context
This issue is from https://portal.microsofticm.com/imp/v5/incidents/details/587009702/summary and logs are in attachment of the ICM issue.

@msyyc msyyc added the Mgmt This issue is related to a management-plane library. label Jan 26, 2025
@msyyc msyyc self-assigned this Jan 26, 2025
@msyyc
Copy link
Member Author

msyyc commented Jan 26, 2025

According to logs, the response body SDK received is incomplete which results in the exception. There are many possible reasons for the incomplete response body but I can't find the root cause for now since I can't reproduce the error locally.
I will continue the try for the reproduce for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

1 participant