-
Notifications
You must be signed in to change notification settings - Fork 498
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
Support ribbon service-level rule customization #478
Conversation
Codecov Report
@@ Coverage Diff @@
## main #478 +/- ##
============================================
+ Coverage 72.32% 72.59% +0.27%
- Complexity 876 886 +10
============================================
Files 172 173 +1
Lines 3306 3321 +15
Branches 413 414 +1
============================================
+ Hits 2391 2411 +20
+ Misses 701 693 -8
- Partials 214 217 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. |
...loud/polaris/router/beanprocessor/PolarisLoadBalancerCompositeRuleBeanPostProcessorTest.java
Outdated
Show resolved
Hide resolved
...loud/polaris/router/beanprocessor/PolarisLoadBalancerCompositeRuleBeanPostProcessorTest.java
Outdated
Show resolved
Hide resolved
...-router/src/main/java/com/tencent/cloud/polaris/router/PolarisLoadBalancerCompositeRule.java
Outdated
Show resolved
Hide resolved
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.
LGTM
@DerekYRC 刚刚测试发现代码实现有点问题,在 List<RouterRequestInterceptor> requestInterceptors = BeanFactoryUtils.getBeans(beanFactory, RouterRequestInterceptor.class); 这一行没有正确获取到对应的 |
我研究下 |
问题出现在NamedContextFactory#createContext中创建的子容器没有继承父容器的bean,很奇怪子容器获取不到父容器的bean,有时间深究下,可能是框架的bug。 一种解决方法是PolarisLoadBalancerCompositeRuleBeanPostProcessor#postProcessBeforeInitialization方法中除IClientConfig外的所有bean都从父容器中获取。 今天修复下。 |
是不是可以做个判断,如果子容器管理没有找到,就去父容器管理找找? |
@SkyeBeFreeman 找到子容器获取不到父容器的bean的原因了,今晚再详细说明和修复下 |
PR Type
Feature
Describe what this PR does for and how you did.
Support ribbon service-level rule customization
Adding the issue link (#xxx) if possible.
#445
Note
Checklist
Codecov Report
should not decrease.Checklist (Optional)