[Document] Py sdk 2026-05-15-preview - #47984
Conversation
…nalyzeDocuments/tspconfig.yaml', API Version: 2026-05-15-preview, SDK Release Type: beta, and CommitSHA: '0295acbed05cf1cb9f92f7307e2a049e8d7058cd' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6179116 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Quentin Robinson (quentinRobinson)
left a comment
There was a problem hiding this comment.
lgtm!
Daniel Jurek (danieljurek)
left a comment
There was a problem hiding this comment.
Approving the ci.yml changes for EngSys
|
/check-enforcer override |
Yuchao Yan (msyyc)
left a comment
There was a problem hiding this comment.
This approval is just for ci.yml since I am one of owner about this file.
…ttps://github.com/amberchen-86/azure-sdk-for-python into v-amber/document-pysdk-2026-05-15-preview-continued
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 58 changed files in this pull request and generated no new comments.
Suppressed comments (20)
sdk/cognitivelanguage/azure-ai-language-documents/samples/sample_submit_job.py:58
- The
RedactionPolicyKindwire discriminator isentityMask(lowercasee), notEntityMask. Using the wrong casing makes this sample request violate the service contract and may be rejected during discriminator deserialization.
sdk/cognitivelanguage/azure-ai-language-documents/samples/sample_get_job_state.py:58 - Use the declared
entityMaskdiscriminator value here.EntityMaskdoes not match the generatedRedactionPolicyKindwire value, so the copied sample can submit an invalid request.
sdk/cognitivelanguage/azure-ai-language-documents/samples/sample_cancel_job.py:58 - The service contract defines this discriminator as
entityMask. The capitalized value does not match the wire enum and can prevent the cancel sample from creating the job it intends to cancel.
sdk/cognitivelanguage/azure-ai-language-documents/samples/async_samples/sample_submit_job_async.py:60 - Use
entityMask, which is the exactRedactionPolicyKindwire value. The current capitalized discriminator makes the async sample request inconsistent with the API schema.
sdk/cognitivelanguage/azure-ai-language-documents/samples/async_samples/sample_get_job_state_async.py:60 - The discriminator is case-sensitive in the API contract and is defined as
entityMask. Correcting this value prevents the async get-state sample from submitting a schema-invalid job.
sdk/cognitivelanguage/azure-ai-language-documents/samples/async_samples/sample_cancel_job_async.py:60 EntityMaskis not the declared wire discriminator; the API and generated enum useentityMask. Fix the casing so this sample can create a job before attempting cancellation.
sdk/cognitivelanguage/azure-ai-language-documents/tests/test_analyze_documents.py:50- All three request bodies in this test file use
EntityMask, while the generated discriminator and service contract requireentityMask. Update every occurrence (lines 50, 105, and 172); otherwise these integration tests exercise schema-invalid requests rather than the operations under test.
sdk/cognitivelanguage/azure-ai-language-documents/tests/test_analyze_documents_async.py:63 - The three async test requests use the wrong discriminator casing. The API wire value is
entityMask, so update lines 63, 120, and 192 to avoid submitting invalid redaction policies.
sdk/cognitivelanguage/azure-ai-language-documents/README.md:162 - Each README snippet uses
EntityMask, but the public wire value isentityMask. Correct all four snippets (lines 162, 234, 293, and 360), ideally by fixing the source samples and regenerating the embedded snippets, so copied examples conform to the API.
"policyKind": "EntityMask",
sdk/cognitivelanguage/azure-ai-language-documents/azure/ai/language/documents/_operations/_patch.py:36
Operation-Locationincludes?api-version=2026-05-15-previewin this API, so taking the raw trailing substring makesdetails["operation_id"]equal to<job-id>?api-version=.... The get-state and cancel samples then place that malformed value into the{jobId}path. Strip the URL query before extracting the final path segment.
path = op_loc.rstrip("/")
sdk/cognitivelanguage/azure-ai-language-documents/azure/ai/language/documents/aio/_operations/_patch.py:36
- The service's
Operation-Locationvalue contains the API-version query string. This rawrstriptherefore leaves the query attached tooperation_id, and the async get-state/cancel samples subsequently send an invalid job ID. Remove the query/fragment before selecting the final path segment.
sdk/cognitivelanguage/azure-ai-language-documents/samples/sample_submit_job.py:47 - Both document locations are polymorphic
DocumentLocationvalues, whose required discriminator iskind. Add"kind": "AzureBlob"to the source and target objects; without it this copied sample sends request bodies that do not conform to the API schema.
This issue also appears on line 58 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/samples/sample_get_job_state.py:47
- The source and target locations require the
DocumentLocation.kinddiscriminator. Include"kind": "AzureBlob"in both dictionaries so the job-state sample can submit a valid request.
This issue also appears on line 58 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/samples/sample_cancel_job.py:47
- These location objects omit the required polymorphic discriminator. Add
"kind": "AzureBlob"to both source and target; otherwise the sample may fail while submitting the job and never reach cancellation.
This issue also appears on line 58 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/samples/async_samples/sample_submit_job_async.py:49
sourceandtargetare discriminatedDocumentLocationmodels, andkindis required on the wire. Add"kind": "AzureBlob"to both objects to make this async sample request valid.
This issue also appears on line 60 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/samples/async_samples/sample_get_job_state_async.py:49
- Add the required
kinddiscriminator to both location dictionaries. The schema defines these asDocumentLocationunions, so a barelocationcannot identify theAzureBlobvariant.
This issue also appears on line 60 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/samples/async_samples/sample_cancel_job_async.py:49
- The async cancellation sample omits the required
DocumentLocation.kindvalue for both inputs. Set each toAzureBlobso job submission succeeds before cancellation is attempted.
This issue also appears on line 60 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/tests/test_analyze_documents.py:35
- Every source and target object in this file omits the required
DocumentLocation.kinddiscriminator. Add"kind": "AzureBlob"to both location objects in all three request bodies; otherwise the integration tests submit schema-invalid jobs.
This issue also appears on line 50 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/tests/test_analyze_documents_async.py:48
- All three async requests need
"kind": "AzureBlob"in both their source and target location objects.kindis a required discriminator in the API schema, so the current test payloads are incomplete.
This issue also appears on line 63 of the same file.
sdk/cognitivelanguage/azure-ai-language-documents/README.md:151
- The four README requests omit the required
kinddiscriminator from each source and target location. Add"kind": "AzureBlob"throughout (preferably by correcting the source samples and regenerating these snippets), or users copying the examples will submit incompleteDocumentLocationvalues.
This issue also appears on line 162 of the same file.
"source": {"location": source_location},
"target": {"location": target_location},
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedBuild: #6688755 | Workflow: API.md Consistency Four distinct failures across multiple check stages:
Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines