Skip to content

Conversation

@jeet1995
Copy link
Member

Description

As title.

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.

@jeet1995 jeet1995 requested review from a team and kirankumarkolli as code owners January 20, 2026 23:27
Copilot AI review requested due to automatic review settings January 20, 2026 23:27
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 enables Execute Stored Procedure requests to be routed to the Gateway V2 endpoint (thin client) by adding support for stored procedure operations alongside existing document operations in the thin client routing logic.

Changes:

  • Added a helper method to identify stored procedure execution requests
  • Updated thin client routing logic to include stored procedure executions
  • Added comprehensive E2E test coverage for stored procedure execution via thin client

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentServiceRequest.java Added isExecuteStoredProcedureBasedRequest() helper method to identify stored procedure execution requests
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java Updated useThinClientStoreModel() to allow thin client routing for stored procedure executions
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientE2ETest.java Added comprehensive E2E test testThinClientStoredProcedure() to validate stored procedure execution through thin client endpoint

Comment on lines +387 to +388
System.setProperty("COSMOS.THINCLIENT_ENABLED", "true");
System.setProperty("COSMOS.HTTP2_ENABLED", "true");
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The System.setProperty calls on lines 387-388 should be commented out to match the pattern used in all other tests in this file. These properties are meant to be set via environment configuration during test execution, not hardcoded in the test. Please comment out these lines like in the other test methods.

Suggested change
System.setProperty("COSMOS.THINCLIENT_ENABLED", "true");
System.setProperty("COSMOS.HTTP2_ENABLED", "true");
// System.setProperty("COSMOS.THINCLIENT_ENABLED", "true");
// System.setProperty("COSMOS.HTTP2_ENABLED", "true");

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

+1

}
}

@Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class)
Copy link
Member

Choose a reason for hiding this comment

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

Is the FlakyTestRetryAnalyzer really needed for this simple test?

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks!

@jeet1995 jeet1995 changed the title [Internal / Gateway V 2_0]: Route Execute Stored Procedure requests to Gateway V2 endpoint. [Internal / Gateway V 2_0 / DO NOT MERGE]: Route Execute Stored Procedure requests to Gateway V2 endpoint. Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants