Repository navigation
refactor: move bindings out of DaprClientImpl - #1924
javier-aliaga wants to merge 3 commits into
Conversation
Signed-off-by: Javier Aliaga <javier@diagrid.io>
…e failure Signed-off-by: Javier Aliaga <javier@diagrid.io>
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues, while the refactoring preserves the public API and adds coverage for key binding edge cases.
No open issues 🎉
What changed in this PR
This PR continues the internal decomposition of DaprClientImpl by moving output-binding invocation logic into a package-private DaprBindingsClient while preserving the existing public API and behavior.
Changes:
- Added
DaprBindingsClientto encapsulate binding request serialization, gRPC invocation, response handling, and deserialization. - Updated
DaprClientImplto initialize the bindings client and delegateinvokeBinding. - Added tests covering null request data, binding error status codes, and deserialization failures.
| File | Description |
|---|---|
| sdk/src/test/java/io/dapr/client/DaprClientGrpcTest.java | Adds coverage for binding requests with null data, error status codes, and deserialization failures. |
| sdk/src/main/java/io/dapr/client/DaprClientImpl.java | Initializes DaprBindingsClient and delegates the public invokeBinding method. |
| sdk/src/main/java/io/dapr/client/DaprBindingsClient.java | Adds a package-private client containing the extracted output-binding invocation logic. |
Review effort: Lite
Signed-off-by: Javier Aliaga <javier@diagrid.io>
| @@ -18,7 +18,7 @@ jobs: | |||
| build: | |||
| name: "Validate Javadocs generation" | |||
| runs-on: oracle-vm-4cpu-16gb-arm64 | |||
There was a problem hiding this comment.
I am wondering why we had to increase the timeout
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1924 +/- ##
============================================
+ Coverage 82.66% 82.91% +0.25%
- Complexity 3966 3978 +12
============================================
Files 359 360 +1
Lines 11965 11971 +6
Branches 1339 1339
============================================
+ Hits 9891 9926 +35
+ Misses 1567 1541 -26
+ Partials 507 504 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Tenth step of splitting
DaprClientImplinto package-private classes, one per building block. This PR moves bindings.DaprBindingsClientholdsinvokeBinding. The body is unchanged.DaprClientImplkeeps its signature and annotations, and delegates in one line.DaprClientImplgoes from 983 to 926 lines.It also raises the timeout of the "Validate Javadocs generation" job from 6 to 10 minutes. The job normally takes 5 to 6 minutes, and the
setup-javacache upload after the last step adds about 30 seconds, so slower runs got cancelled even though every step passed.This PR does not depend on #1918. Both can merge in either order.
Issue reference
Part of #1875
Checklist
DaprClientGrpcTestcover a request with no data, a binding response with an errorstatusCode, and a deserialization failure. The 673sdkunit tests pass.