Repository navigation
refactor: move binary files out of DaprClientImpl - #1907
Open
javier-aliaga wants to merge 1 commit into
Open
javier-aliaga wants to merge 1 commit into
javier-aliaga wants to merge 1 commit into
Conversation
Move deleteBinaryFile, getBinaryFile, getBinaryFileBytes and both setBinaryFile overloads, with their validation, chunking helper and chunk size constant, into a package-private DaprBinaryFileClient. The public methods on DaprClientImpl now delegate to it. Part of dapr#1875 Signed-off-by: Javier Aliaga <javier@diagrid.io>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed refactoring cleanly separates binary file operations into a package-private helper while preserving the existing public API and behavior, with no outstanding review concerns.
No open issues 🎉
What changed in this PR
This pull request extracts the alpha binary file operations from DaprClientImpl into a package-private DaprBinaryFileClient while preserving the existing public API and behavior.
Changes:
- Added
DaprBinaryFileClientwith binary file validation, upload, download, deletion, streaming, and chunking logic. - Updated
DaprClientImplto initialize the helper and delegate its public binary file methods. - Updated the binary upload chunking method reference to use the new helper class.
| File | Description |
|---|---|
| sdk/src/main/java/io/dapr/client/DaprClientImpl.java | Initializes the binary file client and delegates the public binary file methods while retaining their signatures and documentation. |
| sdk/src/main/java/io/dapr/client/DaprBinaryFileClient.java | Provides the extracted package-private implementation for binary file operations, validation, and upload chunking. |
Review effort: Lite
javier-aliaga
marked this pull request as ready for review
November 13, 2026 10:06
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1907 +/- ##
============================================
+ Coverage 81.96% 81.97% +0.01%
- Complexity 3663 3669 +6
============================================
Files 331 332 +1
Lines 11367 11376 +9
Branches 1290 1290
============================================
+ Hits 9317 9326 +9
Misses 1556 1556
Partials 494 494 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
Fifth step of splitting
DaprClientImplinto package-private classes, one per building block. This PR moves the binary file API (alpha).DaprBinaryFileClientholdsdeleteBinaryFile,getBinaryFile,getBinaryFileBytesand bothsetBinaryFileoverloads, plusvalidateBinaryFileArgs,splitBinaryFileChunkand theBINARY_FILE_CHUNK_SIZEconstant. The bodies are unchanged.DaprClientImpl::splitBinaryFileChunknow namesDaprBinaryFileClient::splitBinaryFileChunk.DaprClientImplkeep their signatures and Javadoc, and delegate in one line.DaprClientImplgoes from 1,829 to 1,606 lines.Issue reference
Part of #1875
Checklist
DaprPreviewClientGrpcTestcovers binary files through the public methods. The 626sdkunit tests pass unchanged.