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

Generating python SDK for API version 2024-12-09preview and recording… #40304

Conversation

amruthashree18
Copy link
Member

@amruthashree18 amruthashree18 commented Apr 1, 2025

… 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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@Copilot Copilot bot review requested due to automatic review settings April 1, 2025 00:39
Copy link
Contributor

@Copilot Copilot AI left a 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"))

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-confidentialledger

@amruthashree18 amruthashree18 merged commit 795490d into Azure:main Apr 8, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants