-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An OpenFeign Client for Dapr Invokes #1294
base: master
Are you sure you want to change the base?
Conversation
A OpenFeign Client and it's AutoConfiguration using Dapr Invoke APIs. Splited into two librarys, dapr-openfeign-client is the pure client of OpenFeign, and dapr-spring-openfeign is the plugin of Spring Cloud OpenFeign. Currently only HTTP Invoke Method and Invoke Binding supported, and Invoke Binding is not always recommend to use this client, depends on what binding component is. Signed-off-by: lony2003 <[email protected]>
A OpenFeign Client and it's AutoConfiguration using Dapr Invoke APIs. Splited into two librarys, dapr-openfeign-client is the pure client of OpenFeign, and dapr-spring-openfeign is the plugin of Spring Cloud OpenFeign. Currently only HTTP Invoke Method and Invoke Binding supported, and Invoke Binding is not always recommend to use this client, depends on what binding component is. Signed-off-by: lony2003 <[email protected]>
A OpenFeign Client and it's AutoConfiguration using Dapr Invoke APIs. Splited into two librarys, dapr-openfeign-client is the pure client of OpenFeign, and dapr-spring-openfeign is the plugin of Spring Cloud OpenFeign. Currently only HTTP Invoke Method and Invoke Binding supported, and Invoke Binding is not always recommend to use this client, depends on what binding component is. Signed-off-by: lony2003 <[email protected]>
this example can redirect order request to producer-app. It needs producer-app to run properly. Signed-off-by: lony2003 <[email protected]>
this test tests the PostgreSQL binding of dapr. Signed-off-by: lony2003 <[email protected]>
Signed-off-by: lony2003 <[email protected]>
I haven't reviewed this yet @lony2003 , but I am more convinced that we need this .. @artur-ciocanu @mcruzdev can you help me to check this PR ? |
public class DaprFeignClientAutoConfiguration { | ||
|
||
@Bean | ||
public Targeter targeter(DaprInvokeFeignClient daprInvokeFeignClient) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that this bean from Spring Cloud OpenFeign is overrided in this library. I haven't found a solution to make this bean to be @ConditionalOnMissingBean
. So is this be allowed in libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lony2003 apologies for the delay.. I was at KubeCon last week and I didn't had time to review this.
What's the problem exactly? Can you elaborate a bit? When you run the tests does it clash (is it a duplicate) of another bean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lony2003 I've triggered the build in CI to check what the problem is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@salaboy The original Spring Cloud OpenFeign library FeignAutoConfiguration.java#L165C1-L187C1 and FeignAutoConfiguration.java#L204C3-L213C4 there are two Targeter
beans used depend on the condition, my Targeter
in this library is based on DefaultTargeter
, so I was thinking instead of reimplement Targeter
, we should use AOP to handle the logic to use DaprFeignClient
Fix the example doc to make openfeign app works in mm.py Signed-off-by: lony2003 <[email protected]>
@lony2003 I've just reviewed this PR and it is looking awesome.. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1294 +/- ##
============================================
- Coverage 76.91% 75.46% -1.45%
- Complexity 1592 1660 +68
============================================
Files 145 200 +55
Lines 4843 5307 +464
Branches 562 575 +13
============================================
+ Hits 3725 4005 +280
- Misses 821 976 +155
- Partials 297 326 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
A OpenFeign Client and it's AutoConfiguration using Dapr Invoke APIs.
Splited into two librarys, dapr-openfeign-client is the pure client of OpenFeign, and dapr-spring-openfeign is the plugin of Spring Cloud OpenFeign.
Currently only HTTP Invoke Method and Invoke Binding supported, and Invoke Binding is not always recommend to use this client, depends on what binding component is.
Issue reference
this PR will close: #1181
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: