-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[documentintelligence] Fix copy operation polling #39957
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
Conversation
|
API change check API changes are not detected in this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR fixes the polling behavior and deserialization for copy operations in the Document Intelligence SDK. Key changes include updating the changelog for version 1.0.1, modifying synchronous polling and deserialization logic, and applying similar changes in the asynchronous patch to incorporate the new DocumentModelAdministrationPolling.
Reviewed Changes
| File | Description |
|---|---|
| sdk/documentintelligence/azure-ai-documentintelligence/CHANGELOG.md | Added changelog entry for version 1.0.1 with details on the polling fix. |
| sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_patch.py | Introduced DocumentModelAdministrationPolling and updated deserialization and polling method construction. |
| sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_operations/_patch.py | Updated asynchronous polling and deserialization logic to match the synchronous changes. |
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_patch.py:298
- Ensure that the 'result' key exists in the response JSON before deserialization to avoid a potential KeyError.
deserialized = _deserialize(_models.DocumentModelDetails, response.json()["result"])
sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_operations/_patch.py:268
- Consider verifying the presence of the 'result' key in the response JSON to prevent runtime errors during deserialization.
deserialized = _deserialize(_models.DocumentModelDetails, response.json()["result"])
* fix polling for copy operation * update changelog * update changelog * async operation * update changelog date * pylint --------- Co-authored-by: catalinaperalta <caperal@microsoft.com>
Fix polling and deserialization for copy operations. Using the same logic that we used in the azure-ai-formrecognizer sdk.
Follow up issue: #39974