Add merge support#42924
Merged
allenkim0129 merged 4 commits intoAzure:mainfrom Oct 21, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds merge support capability to the Azure Cosmos DB SDK by including a new header in all API requests to indicate the SDK supports partition merge operations.
- Adds SDK supported capabilities infrastructure with partition merge capability constant
- Modifies base request handling to include the merge support header in all API calls
- Implements unit tests to verify the header is correctly set in requests
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py |
Adds new SDKSupportedCapabilities class with constants for capability values |
sdk/cosmos/azure-cosmos/azure/cosmos/_base.py |
Updates GetHeaders function to include merge support capability header in all requests |
sdk/cosmos/azure-cosmos/tests/test_partition_merge.py |
Adds new test class to verify merge support header is present in API requests |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
bambriz
reviewed
Sep 29, 2025
bambriz
approved these changes
Sep 29, 2025
Member
bambriz
left a comment
There was a problem hiding this comment.
Left a None blocking comment, but otherwise This Looks good to me. Thank you Allen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add merge support by adding merge support capability header to all API requests.
Main working item: #36590
References:
Changes
x-ms-cosmos-sdk-supported-capabilities = '1'in the headerTests
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines