Skip to content

Conversation

@simorenoh
Copy link
Member

@simorenoh simorenoh commented Dec 8, 2025

Some of the code that we had added to the initial implementations of Vector Search queries' execution within the SDK was initially pieced together with the assumption that certain bits were not working by default on the initial release of these features, or that the rollout of the features was not present in every region immediately.

This PR removes that leftover logic that no longer plays a role, since these features exist in every region and any code that was added to the SDK as a workaround to missing logic in the service is also leftover at this point.

@simorenoh
Copy link
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simorenoh simorenoh marked this pull request as ready for review December 11, 2025 19:04
@simorenoh simorenoh requested a review from a team as a code owner December 11, 2025 19:04
Copilot AI review requested due to automatic review settings December 11, 2025 19:04
@simorenoh simorenoh changed the title [Cosmos] remove old code from FTS and VS scenarios [Cosmos] remove old code from VS scenarios Dec 11, 2025
Copy link
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
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 removes legacy workaround code that was added during the initial rollout of Full Text Search (FTS) and Vector Search features in Azure Cosmos DB. The changes clean up the AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY environment variable and associated conditional logic that was used to handle regions or emulators that hadn't been updated with the NonStreamingOrderBy capability. Since these features are now available in all regions, this workaround code is no longer necessary.

Key Changes

  • Removed the AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY environment variable and its configuration constants
  • Removed conditional logic that adjusted supported query features based on this environment variable
  • Cleaned up test files that were setting this environment variable or checking for localhost-specific workarounds
  • Updated README to remove the note about using the environment variable as a workaround

Reviewed changes

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

Show a summary per file
File Description
_cosmos_client_connection.py Removed conditional logic that limited supported query features when NonStreamingOrderBy was disabled
_cosmos_client_connection_async.py Removed conditional logic that limited supported query features when NonStreamingOrderBy was disabled (async version)
_constants.py Removed the NON_STREAMING_ORDER_BY_DISABLED_CONFIG constant definitions
README.md Removed documentation note about the workaround environment variable
test_query_vector_similarity.py Removed test code that was setting the deprecated environment variable
test_query_vector_similarity_async.py Removed test code that was setting the deprecated environment variable (async version)
test_query_cross_partition.py Removed localhost-specific conditional that set the environment variable
test_query_cross_partition_async.py Removed localhost-specific conditional that set the environment variable (async version)
test_query.py Removed localhost-specific conditional that set the environment variable
test_query_async.py Removed localhost-specific conditional that set the environment variable (async version)
test_partition_split_query.py Removed localhost-specific conditional that set the environment variable
test_multi_orderby.py Removed localhost-specific conditional that set the environment variable
test_aggregate.py Removed localhost-specific conditional that set the environment variable

The changes are clean, consistent across sync and async implementations, and complete - all references to the removed constants have been properly cleaned up. No issues were identified during the review.

@simorenoh simorenoh merged commit 4aa8d4f into main Dec 11, 2025
28 of 29 checks passed
@simorenoh simorenoh deleted the remove-old-code branch December 11, 2025 19:15
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