-
Notifications
You must be signed in to change notification settings - Fork 172
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
【enhancement】add policy event, report to backend #1171
Conversation
1d6306d
to
7548632
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #1171 +/- ##
=============================================
+ Coverage 41.57% 42.16% +0.58%
- Complexity 3184 3226 +42
=============================================
Files 810 812 +2
Lines 17826 17917 +91
Branches 1938 1948 +10
=============================================
+ Hits 7411 7554 +143
+ Misses 9475 9415 -60
- Partials 940 948 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 28 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
...-service/src/test/java/com/huaweicloud/sermant/router/dubbo/handler/TagRouteHandlerTest.java
Outdated
Show resolved
Hide resolved
...-service/src/test/java/com/huaweicloud/sermant/router/dubbo/handler/TagRouteHandlerTest.java
Show resolved
Hide resolved
...ommon/src/main/java/com/huaweicloud/sermant/router/config/strategy/AbstractRuleStrategy.java
Outdated
Show resolved
Hide resolved
...ommon/src/main/java/com/huaweicloud/sermant/router/config/strategy/AbstractRuleStrategy.java
Outdated
Show resolved
Hide resolved
...service/src/test/java/com/huaweicloud/sermant/router/spring/handler/TagRouteHandlerTest.java
Show resolved
Hide resolved
62847f3
to
b340639
Compare
...ommon/src/main/java/com/huaweicloud/sermant/router/config/strategy/AbstractRuleStrategy.java
Outdated
Show resolved
Hide resolved
...onfig-common/src/main/java/com/huaweicloud/sermant/router/config/utils/PolicyEventUtils.java
Outdated
Show resolved
Hide resolved
...onfig-common/src/main/java/com/huaweicloud/sermant/router/config/utils/PolicyEventUtils.java
Show resolved
Hide resolved
f553868
to
abd3495
Compare
10852ad
to
04684d6
Compare
...ommon/src/main/java/com/huaweicloud/sermant/router/config/strategy/AbstractRuleStrategy.java
Outdated
Show resolved
Hide resolved
sermant-backend/src/main/webapp/frontend/src/views/EventsView.vue
Outdated
Show resolved
Hide resolved
dd00c41
to
47a8c46
Compare
【修复issue】#1176
【修改内容】
Policy事件包含三件:
1.相同标签规则匹配成功: 全部实例最小可用阈值大于全部可用实例数,则同TAG优先
2.相同标签规则匹配成功:
未设置全部实例最小可用阈值,超过(大于等于)同TAG比例阈值,则同TAG优先
设置了全部实例最小可用阈值,但其小于全部TAG可用实例,超过(大于等于)同TAG比例阈值,则同TAG优先
3.相同标签规则匹配失败
【用例描述】无
【自测情况】(feign,rest,dubbo):只会上报前后两次状态不同的事件
应用:一个带gray:red的parameter且版本为1.0.1的consumer
三个provider分别是:
模拟请求:
场景一:policy中仅设置比例阈值为20%,同TAG优先
验证:同TAG优先,一直访问到带red的下游服务
backend界面:同TAG优先规则匹配生效
场景二:policy中仅设置比例阈值为50%,非同TAG优先,随机访问ALL
验证:非同TAG优先,随机访问
backend界面:同TAG优先规则匹配失效
场景三:policy中设置比例阈值为20%和最小可用实例阈值4,同TAG优先
验证:同TAG优先,一直访问到带red的下游服务
backend界面:同TAG优先规则匹配生效
场景四:policy中设置比例阈值为20%和最小可用实例阈值1,同TAG优先
验证:同TAG优先,一直访问到带red的下游服务
backend界面:同TAG优先规则匹配生效
场景五:policy中设置比例阈值为50%和最小可用实例阈值1,非同TAG优先,随机访问ALL
验证:非同TAG优先,随机访问ALL
backend界面:同TAG优先规则匹配失效
【影响范围】是需要更新一些文档(router手册)