-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Cosmos] remove old code from VS scenarios #44326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit d37fea6.
tvaron3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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_BYenvironment 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.
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.