Repository navigation
refactor: move service invocation out of DaprClientImpl - #1918
Open
javier-aliaga wants to merge 2 commits into
Open
javier-aliaga wants to merge 2 commits into
javier-aliaga wants to merge 2 commits into
Conversation
Signed-off-by: Javier Aliaga <javier@diagrid.io>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The refactoring cleanly extracts service-invocation logic while preserving the public API and has no active review issues.
No open issues 🎉
What changed in this PR
This PR continues the internal decomposition of DaprClientImpl by moving service invocation logic into a package-private DaprServiceInvocationClient while preserving the existing public API and behavior.
Changes:
- Extracted HTTP method invocation, HTTP client creation, request serialization, and response deserialization.
- Added delegation from
DaprClientImplto the new service invocation client. - Removed service-invocation-specific implementation details and imports from
DaprClientImpl.
| File | Description |
|---|---|
| sdk/src/main/java/io/dapr/client/DaprServiceInvocationClient.java | Adds the package-private service invocation client containing the extracted invocation and HTTP response mapping logic. |
| sdk/src/main/java/io/dapr/client/DaprClientImpl.java | Initializes the extracted service invocation client and delegates the existing public service invocation methods. |
Review effort: Lite
Signed-off-by: Javier Aliaga <javier@diagrid.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1918 +/- ##
============================================
+ Coverage 82.70% 82.72% +0.01%
- Complexity 3967 3973 +6
============================================
Files 359 360 +1
Lines 11965 11972 +7
Branches 1339 1339
============================================
+ Hits 9896 9904 +8
- Misses 1561 1563 +2
+ Partials 508 505 -3 ☔ 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
Ninth step of splitting
DaprClientImplinto package-private classes, one per building block. This PR moves service invocation.DaprServiceInvocationClientholdsinvokeMethod,invokeHttpClientand the HTTP response mapping (getMonoForHttpResponse). The bodies are unchanged.DaprClientImplkeep their signatures and annotations, and delegate in one line.DaprClientImplgoes from 983 to 911 lines.Issue reference
Part of #1875
Checklist
DaprClientHttpTestcovers service invocation through the public methods. The 670sdkunit tests pass unchanged.