Skip to content

Add merge support#42924

Merged
allenkim0129 merged 4 commits intoAzure:mainfrom
allenkim0129:users/allekim/feature/mergeSupport
Oct 21, 2025
Merged

Add merge support#42924
allenkim0129 merged 4 commits intoAzure:mainfrom
allenkim0129:users/allekim/feature/mergeSupport

Conversation

@allenkim0129
Copy link
Copy Markdown
Contributor

@allenkim0129 allenkim0129 commented Sep 9, 2025

Description

Add merge support by adding merge support capability header to all API requests.

Main working item: #36590
References:

Changes

  • SDK will send x-ms-cosmos-sdk-supported-capabilities = '1' in the header

Tests

  • Added Unit tests to verify if the request headers contain the merge support header
  • Manual tests with the changes in the PR: Test Results

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings September 9, 2025 20:09
@allenkim0129 allenkim0129 requested a review from a team as a code owner September 9, 2025 20:09
Copy link
Copy Markdown
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 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

Comment thread sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-cosmos

Comment thread sdk/cosmos/azure-cosmos/tests/test_partition_merge.py Outdated
Copy link
Copy Markdown
Member

@bambriz bambriz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a None blocking comment, but otherwise This Looks good to me. Thank you Allen.

Copy link
Copy Markdown
Member

@tvaron3 tvaron3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@bambriz bambriz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@allenkim0129 allenkim0129 merged commit cb3227a into Azure:main Oct 21, 2025
21 checks passed
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.

4 participants