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

[Cosmos] add backwards compatibility tests for irrelevant kwargs #40150

Merged
merged 7 commits into from
Mar 20, 2025

Conversation

simorenoh
Copy link
Member

In PR 40008 we are removing several options that are available in methods where they don't make sense. As part of that work, we are also rolling out these backwards compatibility tests to ensure that they work both before and after removing these from the method signatures, ensuring this has no breaking behavior on the affected methods.

@Copilot Copilot bot review requested due to automatic review settings March 19, 2025 22:06
@simorenoh simorenoh requested review from annatisch and a team as code owners March 19, 2025 22:06
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 PR adds backwards compatibility tests to ensure that unused kwargs such as session_token and etag/match_condition do not affect the behavior of Cosmos DB methods.

  • Added asynchronous test cases for session_token and etag/match_condition compatibility.
  • Added synchronous test cases to mirror async tests for validating compatibility across Database, Container, and Item operations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility_async.py New async tests validating backwards compatibility for irrelevant kwargs.
sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility.py Added sync tests to check that session_token and etag/match_condition parameters do not break existing behavior.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@simorenoh simorenoh merged commit fa26c29 into main Mar 20, 2025
19 checks passed
@simorenoh simorenoh deleted the backwards-compat-tests branch March 20, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants