Skip to content

Support the binary store API (alpha) from Dapr 1.19 - #1870

Merged
dapr-bot merged 8 commits into
dapr:masterfrom
siri-varma:feature/1851-binary-store
Oct 26, 2026
Merged

dapr-bot merged 8 commits into
dapr:masterfrom
siri-varma:feature/1851-binary-store

Conversation

@siri-varma

Copy link
Copy Markdown
Contributor

Description

Adds client support for the binary store building block (alpha) from Dapr 1.19. An app can store, read, and delete files as byte streams through a binary store component.

New methods on DaprPreviewClient:

  • setBinaryFile(SetBinaryFileRequestAlpha1) and setBinaryFile(storeName, fileName, byte[], overwrite). The client sends initial_request first, then the content in chunks of at most 32 KiB, with seq from 0. If overwrite is false and the file exists, the call fails with ALREADY_EXISTS.
  • getBinaryFile(storeName, fileName) returns Flux<byte[]>. The client asks gRPC for messages only when the subscriber has demand, so a slow subscriber does not make the client buffer the whole file. If the subscriber cancels, the gRPC call is cancelled.
  • getBinaryFileBytes(storeName, fileName) returns the whole file as Mono<byte[]>.
  • deleteBinaryFile(storeName, fileName) returns Mono<Void>.

The request class is io.dapr.client.domain.SetBinaryFileRequestAlpha1. It follows the pattern of EncryptRequestAlpha1.

Errors keep their gRPC status code. For example, a missing file gives DaprException with error code NOT_FOUND.

Known limit: upload does not use gRPC flow control, the same as crypto encrypt. If the content Flux produces data faster than the network sends it, gRPC holds the extra data in memory. The Javadoc says this.

Other changes:

  • DaprPreviewClientBinaryStoreIT: a Testcontainers test against daprd 1.19.0 with the binarystore.in-memory component. It covers small and 1 MiB round trips, overwrite true and false, and read after delete.
  • examples/.../binarystore: an example and a README that mm.py runs. The README is added to validate.yml.

The API is alpha, so its names and behavior can change in a later release. Docs for dapr/docs will follow in a separate PR.

Issue reference

Please reference the issue this PR will close: #1851

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
…apr#1851)

Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
@siri-varma
siri-varma requested review from a team as code owners October 26, 2026 06:03
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.46%. Comparing base (15bec05) to head (8326381).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1870      +/-   ##
============================================
+ Coverage     80.21%   80.46%   +0.25%     
- Complexity     2801     2835      +34     
============================================
  Files           273      274       +1     
  Lines          8278     8412     +134     
  Branches        896      905       +9     
============================================
+ Hits           6640     6769     +129     
- Misses         1272     1277       +5     
  Partials        366      366              

☔ 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.

@dapr-bot
dapr-bot merged commit 53373f4 into dapr:master Oct 26, 2026
17 checks passed
javier-aliaga pushed a commit that referenced this pull request Oct 26, 2026
* feat: add deleteBinaryFile to DaprPreviewClient (#1851)



* feat: add getBinaryFile to DaprPreviewClient (#1851)



* fix: apply backpressure to getBinaryFile downloads (#1851)



* feat: add setBinaryFile to DaprPreviewClient (#1851)



* fix: report the content error once when a binary file upload fails (#1851)



* docs: add binary store example (#1851)



* test: add binary store integration test (#1851)



* fix: tighten binary store cancel and error paths (#1851)



---------


(cherry picked from commit 53373f4)

Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Co-authored-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support the binary store API (alpha) from Dapr 1.19

3 participants