Cosmos: remove query-engine-based readmany support#26133
Merged
analogrelay merged 1 commit intomainfrom Mar 9, 2026
Merged
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
simorenoh
approved these changes
Mar 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the query-engine-based ReadMany path from the azcosmos SDK. Since PR #26007 introduced a Go-native ReadMany implementation (EPK-grouped queries), the previous preview feature that delegated ReadMany to an external QueryEngine via ReadManyOptions.QueryEngine is no longer needed and is safely removed. This simplifies the code path and eliminates a preview API that was not supported in production.
Changes:
- Removed
QueryEnginefield fromReadManyOptionsand all related routing logic (executeReadManyWithEngine) fromcosmos_container.goandcosmos_container_read_many.go. - Replaced the
MockReadManyPipelineimplementation in the mock with a minimal stub that returns an error (since the SDK no longer callsCreateReadManyPipeline), while keeping the method to satisfy theQueryEngineinterface. - Updated
CHANGELOG.mdto document the breaking change and refine the feature description.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
cosmos_container.go |
Removes the query-engine branch and correlated activity ID setup for the ReadMany path |
cosmos_container_read_many.go |
Deletes the executeReadManyWithEngine function entirely |
cosmos_read_many_request_options.go |
Removes the QueryEngine field from ReadManyOptions |
internal/mock/mock_query_engine.go |
Replaces MockReadManyPipeline with a stub that errors, satisfying the interface for backward compatibility |
emulator_cosmos_read_many_items_test.go |
Removes two emulator tests that exercised the query-engine code path |
CHANGELOG.md |
Documents the breaking removal of QueryEngine from ReadManyOptions |
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.
Now that we have #26007 (Go-native ReadMany), this PR removes all the query-engine logic from the ReadMany path. This was all preview already so it's safe to remove it.