Match condition not being honored in Upsert item calls #11791
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Milestone
Describe the bug
Upsert item function is ignoring the match_condition options. After looking at the code, found that the upsert_item method is ignoring the created request_options.
https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/cosmos/azure-cosmos/azure/cosmos/container.py#L451
Note that the
request_options
variable is not being passed to the subsequentUpsertItem
call.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The upsert call should be rejected with
azure.cosmos.exceptions.CosmosAccessConditionFailedError: (PreconditionFailed) Operation cannot be performed because one of the specified precondition is not met.,
error.The text was updated successfully, but these errors were encountered: