-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[CosmosDB] 2025-11-01-preview API version #9395
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
base: main
Are you sure you want to change the base?
Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @pjohari-ms, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Hi @pjohari-ms
|
1 similar comment
|
Hi @pjohari-ms
|
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 PR updates the Azure Cosmos DB preview extension by bumping the version from 1.6.1 to 1.7.1 and updating vendored SDK code. The changes primarily consist of API version updates (from 2025-05-01-preview to 2025-11-01-preview), type hint modernizations, return type annotations, and consistent code formatting improvements across numerous operation files.
Key changes:
- Version bump from 1.6.1 to 1.7.1
- API version update from "2025-05-01-preview" to "2025-11-01-preview" across all operations
- Modernized type hints (Dict → dict, Iterable → ItemPaged)
- Added return type annotations (-> None) to init methods
- Consistent multi-line formatting for error deserialization
- New GarnetClustersOperations file added
- Content-type handling improvements for optional body parameters
Reviewed Changes
Copilot reviewed 112 out of 115 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Version updated from 1.6.1 to 1.7.1 |
| _throughput_pools_operations.py | API version update, type hint modernizations, error formatting |
| _throughput_pool_operations.py | API version update, content-type handling fix, error formatting |
| _throughput_pool_accounts_operations.py | API version update, type hint changes, error formatting |
| _throughput_pool_account_operations.py | API version update, type hint changes, error formatting |
| _table_resources_operations.py | API version update, type hint changes, error formatting |
| _sql_resources_operations.py | API version update, type hint changes, error formatting |
| _service_operations.py | API version update, type hint changes |
| restorable*_operations.py (multiple) | API version update, type hint changes |
| private*_operations.py (multiple) | API version update, type hint changes, error formatting |
| percentile*_operations.py (multiple) | API version update, type hint changes |
| partition_key_range*_operations.py (multiple) | API version update, type hint changes |
| _operations.py | API version update, type hint changes |
| _notebook_workspaces_operations.py | API version update, error model name change, error formatting |
| _network_security_perimeter_configurations_operations.py | API version update, type hint changes, error formatting |
| mongo*_operations.py (multiple) | API version update, type hint changes, error formatting |
| _locations_operations.py | API version update, type hint changes |
| _gremlin_resources_operations.py | API version update, function reordering, error formatting |
| _graph_resources_operations.py | API version update, type hint changes |
| _garnet_clusters_operations.py | New operations file for Garnet clusters |
| fleetspace*_operations.py (multiple) | API version update, error model changes, content-type fixes, status code updates |
| fleet*_operations.py (multiple) | API version update, error model changes, content-type fixes |
| database*_operations.py (multiple) | API version update, type hint changes |
| _data_transfer_jobs_operations.py | API version update, type hint changes |
| aio/_throughput_pool_accounts_operations.py | API version update, type hint changes, error formatting |
| response = pipeline_response.http_response | ||
|
|
||
| if response.status_code not in [200, 201, 202]: | ||
| if response.status_code not in [200, 201]: |
Copilot
AI
Nov 5, 2025
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.
The expected status codes for the create operation changed from [200, 201, 202] to [200, 201]. Ensure that removing status code 202 from the success criteria is intentional and aligns with the updated API specification, as this could cause valid 202 (Accepted) responses to be treated as errors.
| response = pipeline_response.http_response | ||
|
|
||
| if response.status_code not in [202, 204, 200]: | ||
| if response.status_code not in [202, 204]: |
Copilot
AI
Nov 5, 2025
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.
The expected status codes for the delete operation changed from [202, 204, 200] to [202, 204]. Ensure that removing status code 200 from the success criteria is intentional and aligns with the updated API specification.
| error = self._deserialize.failsafe_deserialize( | ||
| _models.ErrorResponseAutoGenerated, | ||
| pipeline_response, | ||
| ) |
Copilot
AI
Nov 5, 2025
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.
The error model changed from ErrorResponseAutoGenerated2 to ErrorResponseAutoGenerated. Verify that this change is correct and that the new model has the same structure as the old one, or document why the model name changed.
| map_error(status_code=response.status_code, response=response, error_map=error_map) | ||
| error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) | ||
| error = self._deserialize.failsafe_deserialize( | ||
| _models.ErrorResponseAutoGenerated2, |
Copilot
AI
Nov 5, 2025
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.
The error model changed from ErrorResponseAutoGenerated to ErrorResponseAutoGenerated2. Verify that this change is correct and that the new model has the same structure as the old one, or document why the model name changed to include a '2' suffix.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.