[CosmosDB] az cosmosdb fleet: Update GA contract#9395
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
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
|
There was a problem hiding this comment.
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]: |
There was a problem hiding this comment.
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]: |
There was a problem hiding this comment.
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, | ||
| ) |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
Update test and documentation to include IsDefaultBucket field in ThroughputBuckets
Update and record throughput bucketing test
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9395 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ cosmosdb-preview-1.6.2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=144757780&view=results |
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.