Skip to content

Conversation

@pjohari-ms
Copy link
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings November 5, 2025 20:23
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link

Hi @pjohari-ms,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 5, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Hi @pjohari-ms

⚠️ Release Requirements

Module: cosmosdb-preview

  • Please log updates into to src/cosmosdb-preview/HISTORY.rst
  • ⚠️ Please update VERSION to be 1.6.2 in src/cosmosdb-preview/setup.py

Notes

1 similar comment
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Hi @pjohari-ms

⚠️ Release Requirements

Module: cosmosdb-preview

  • Please log updates into to src/cosmosdb-preview/HISTORY.rst
  • ⚠️ Please update VERSION to be 1.6.2 in src/cosmosdb-preview/setup.py

Notes

@github-actions github-actions bot added release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. labels Nov 5, 2025
Copy link
Contributor

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 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]:
Copy link

Copilot AI Nov 5, 2025

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.

Copilot uses AI. Check for mistakes.
response = pipeline_response.http_response

if response.status_code not in [202, 204, 200]:
if response.status_code not in [202, 204]:
Copy link

Copilot AI Nov 5, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +331 to +334
error = self._deserialize.failsafe_deserialize(
_models.ErrorResponseAutoGenerated,
pipeline_response,
)
Copy link

Copilot AI Nov 5, 2025

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.

Copilot uses AI. Check for mistakes.
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,
Copy link

Copilot AI Nov 5, 2025

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot CosmosDB release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants