Skip to content

feat: support the vector API (alpha) from Dapr 1.19 - #1901

Merged
javier-aliaga merged 1 commit into
dapr:masterfrom
AdepuSriCharan:feat/vector-alpha1
Nov 10, 2026
Merged

javier-aliaga merged 1 commit into
dapr:masterfrom
AdepuSriCharan:feat/vector-alpha1

Conversation

@AdepuSriCharan

Copy link
Copy Markdown
Contributor

Description

Adds support for the Vector API (alpha) introduced in Dapr 1.19.

This PR covers the vector portion of #1879; the search API will follow in a separate PR. The approach was approved by the maintainer.

The changes include:

  • New DaprPreviewClient methods for creating, reading, listing and deleting collections, managing vector records, and running single or batch vector queries.
  • A package-private DaprVectorClient using DaprGrpcCalls, with domain types that keep generated protobuf classes out of the public API.
  • Request validation and error handling for invalid responses.
  • Unit tests, a Testcontainers integration test using vector.in-memory, and a working example.

Testing:

  • Full Maven build passed on JDK 17, with 626 SDK tests and no Checkstyle violations.
  • SpotBugs reported no issues in the SDK and examples.
  • Vector integration tests passed (5/5) against daprd 1.19.1.
  • The example passed mechanical-markdown validation against daprd 1.19.0.

Backport note: This implementation depends on DaprGrpcCalls (#1883), which is not currently on release-1.19. That change would need to be backported first.

Issue reference

Part of #1879. The remaining search API will be implemented separately.

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation — the dapr/docs update will follow in a separate PR.

Add DaprPreviewClient methods for the nine vector RPCs added in Dapr 1.19 (collections, records, queries and batch queries), backed by a package-private DaprVectorClient on DaprGrpcCalls. New domain types keep the generated protos out of the public API; IndexingOptions, IndexAck and FailedItem are shared so the search API can reuse them.

Requests are validated before the sidecar is called, and replies that break the proto's guarantees fail with INTERNAL, as in the .NET and JS clients.

Includes unit tests, a Testcontainers IT against daprd 1.19.1 and an example validated with mechanical-markdown.

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
@AdepuSriCharan
AdepuSriCharan requested review from a team as code owners November 9, 2026 09:24
Copilot AI balanced review requested due to automatic review settings November 9, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain, with the required zero-length vector validation gap addressed and supported by unit and integration coverage.

No open issues 🎉

Review effort: Lite

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.05838% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.96%. Comparing base (70d5ffd) to head (2070c11).

Files with missing lines Patch % Lines
...src/main/java/io/dapr/client/DaprVectorClient.java 98.43% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1901      +/-   ##
============================================
+ Coverage     81.10%   81.96%   +0.85%     
- Complexity     3396     3645     +249     
============================================
  Files           310      329      +19     
  Lines         10809    11340     +531     
  Branches       1241     1290      +49     
============================================
+ Hits           8767     9295     +528     
  Misses         1550     1550              
- Partials        492      495       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@javier-aliaga
javier-aliaga merged commit e2e5b3c into dapr:master Nov 10, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants