Skip to content

Cosmos: remove query-engine-based readmany support#26133

Merged
analogrelay merged 1 commit intomainfrom
ashleyst/remove-query-engine-read-many
Mar 9, 2026
Merged

Cosmos: remove query-engine-based readmany support#26133
analogrelay merged 1 commit intomainfrom
ashleyst/remove-query-engine-read-many

Conversation

@analogrelay
Copy link
Copy Markdown
Member

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

API Change Check

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

sdk/data/azcosmos

@analogrelay analogrelay marked this pull request as ready for review March 9, 2026 16:56
@analogrelay analogrelay requested a review from a team as a code owner March 9, 2026 16:56
Copilot AI review requested due to automatic review settings March 9, 2026 16:56
@github-actions github-actions bot added the Cosmos label Mar 9, 2026
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 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 QueryEngine field from ReadManyOptions and all related routing logic (executeReadManyWithEngine) from cosmos_container.go and cosmos_container_read_many.go.
  • Replaced the MockReadManyPipeline implementation in the mock with a minimal stub that returns an error (since the SDK no longer calls CreateReadManyPipeline), while keeping the method to satisfy the QueryEngine interface.
  • Updated CHANGELOG.md to 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

@analogrelay analogrelay merged commit 3290643 into main Mar 9, 2026
19 of 20 checks passed
@analogrelay analogrelay deleted the ashleyst/remove-query-engine-read-many branch March 9, 2026 18:45
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.

3 participants