-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Generating python SDK for API version 2024-12-09preview and recording… #40304
Generating python SDK for API version 2024-12-09preview and recording… #40304
Conversation
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.
Pull Request Overview
This pull request regenerates the Confidential Ledger Python SDK to support a newer API version ("2024-12-09-preview") and aligns client behavior, configuration, and tests accordingly. Key changes include:
- Updating default api_version values in client, configuration, and request builder files from "2024-08-22-preview" to "2024-12-09-preview".
- Updating swagger files with new input-file URLs and bumping the package version where needed.
- Adjusting test assertions to reflect revised response structures (assignedRoles now only includes "Reader").
Reviewed Changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/test_confidential_ledger_client_async.py | Updated test assertions to validate the new role expectation. |
tests/test_confidential_ledger_client.py | Updated test assertions to validate the new role expectation. |
swagger/README.md | Updated swagger spec URLs and bumped package version. |
azure/confidentialledger/certificate/aio/_operations/_operations.py | Updated api_version default value in the request builder. |
azure/confidentialledger/certificate/aio/_configuration.py, azure/confidentialledger/certificate/aio/_client.py, azure/confidentialledger/certificate/_configuration.py, azure/confidentialledger/certificate/_client.py, azure/confidentialledger/_configuration.py, azure/confidentialledger/_client.py |
Updated api_version in configuration/client files. |
azure/confidentialledger/certificate/_serialization.py, azure/confidentialledger/_serialization.py |
Removed deprecated timezone implementations and modernized type hints. |
Files not reviewed (1)
- sdk/confidentialledger/azure-confidentialledger/assets.json: Language not supported
Comments suppressed due to low confidence (5)
sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_async.py:422
- Ensure that the removal of the 'Contributor' role from the expected assignedRoles is intentional and aligns with the new API behavior.
assert user["assignedRoles"] == ["Reader"]
sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client.py:428
- Confirm that the updated expected assignedRoles in this test correctly reflect the new API response format.
assert user["assignedRoles"] == ["Reader"]
sdk/confidentialledger/azure-confidentialledger/swagger/README.md:10
- Verify that the updated swagger spec URL is correct and reflects the intended API version changes.
input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-12-09-preview/confidentialledger.json
sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_serialization.py:186
- Review that replacing the custom UTC implementation with datetime.timezone.utc maintains the intended timezone behavior, especially if there were any special DST considerations.
TZ_UTC = datetime.timezone.utc
sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_operations.py:45
- Ensure that the updated default api_version in the request builder is consistent with the new specification and works correctly with downstream API calls.
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-12-09-preview"))
API change check APIView has identified API level changes in this PR and created following API reviews. |
… tests
Description
This PR updates the python SDK configuration for the Confidential Ledger to use the new API version 2024-12-09preview adding user defined function feature and few minor spec updates from previous API spec version.
https://github.com/Azure/azure-rest-api-specs/tree/main/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-12-09-preview
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines