You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "little-cui (via GitHub)" <gi...@apache.org> on 2023/03/16 11:18:01 UTC

[GitHub] [servicecomb-java-chassis] little-cui opened a new issue, #3709: 新老灰度发布配置不兼容?请确认生效逻辑

little-cui opened a new issue, #3709:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3709

   **场景:**由于老版本框架配置的是cse开头的配置来控制灰度发布规则,升级框架后,客户按新的[配置方式](https://servicecomb.apache.org/references/java-chassis/zh_CN/references-handlers/router.html)增加新的灰度规则。
   
   配置项1:cse.darklaunch.policy.weather
   ```json
   {"policyType":"RULE","ruleItems":[{"groupName":"self_rule_656473","groupCondition":"version=0.0.3","policyCondition":"city=beijing","versions":["0.0.3"]}],"empty":false}
   ```
   
   配置项2:servicecomb.routeRule.weather
   ```yaml
   ---
   - precedence: 1
     route:
     - weight: 100
       tags:
         version: "0.0.2"
   - precedence: 2
     match:
       headers:
         city:
           exact: "chengdu"
           caseInsensitive: false
     route:
     - weight: 100
       tags:
         version: "0.0.3"
   ```
   
   **预期:**
   1、city=beijing流量100%转发到灰度版本0.0.3
   2、city=chengdu流量100%转发到灰度版本0.0.3
   3、其他100%转发到版本0.0.2
   **实际:**
   1、city=beijing流量100%转发到版本0.0.2
   2、city=chengdu流量100%转发到版本0.0.2
   3、其他100%转发到版本0.0.2
   
   **框架版本:**2.7.9
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] lbc97 commented on issue #3709: 新老灰度发布配置不兼容?请确认生效逻辑

Posted by "lbc97 (via GitHub)" <gi...@apache.org>.
lbc97 commented on issue #3709:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3709#issuecomment-1473060877

   请确认一下自己给的现象 我这边走的demo是符合我这个逻辑现象的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] lbc97 commented on issue #3709: 新老灰度发布配置不兼容?请确认生效逻辑

Posted by "lbc97 (via GitHub)" <gi...@apache.org>.
lbc97 commented on issue #3709:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3709#issuecomment-1471778764

   1.新老规则不推荐同时使用,因为这不符合使用逻辑
   2.新规则要求走0.2版本,老规则要求走0.1版本,怎么处理都是不兼容
   3.新老版本同时生效逻辑非常复杂,需要具体情况具体分析,代码在https://github.com/apache/servicecomb-java-chassis/blob/2.8.x/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadBalancer.java#:~:text=servers%20%3D%20filterExt.getFilteredListOfServers(servers%2C%20invocation)%3B 可以确定的是新的灰度处理逻辑先于老的加载处理逻辑 但这并不意味着老的灰度发布会简单覆盖新的灰度处理逻辑 需要debug源码分析。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] lbc97 commented on issue #3709: 新老灰度发布配置不兼容?请确认生效逻辑

Posted by "lbc97 (via GitHub)" <gi...@apache.org>.
lbc97 commented on issue #3709:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3709#issuecomment-1473057896

   老的灰度发布逻辑 首先会对要匹配条件进行分组 你要符合条件的走0.0.3版本 那么会把0.0.3和不是0.0.3的版本分为两组 一组为筛选组(为0.0.3版本) 一组为默认组(不是0.0.3版本) 筛选完之后会对用户输入条件进行匹配 如果匹配上就会返回筛选组 如果不匹配就会返回默认组   如果匹配上但是筛选组为空也会返回默认组进行一个空实例保护
   你这个例子具体走的逻辑如下: city = beijing时新灰度筛选完之后 只剩下0.0.2版本 0.0.2版本为默认组 但是因为筛选组为空 就算符合条件 也只能返回默认组 其他流量同理 
   city = chengdu时 新灰度筛选完 只剩下0.0.3版本 但是0.0.3根据你的配置被分进筛选组 但是又在筛选的时候对不上要匹配的条件 所以返回默认组但是默认组为空所以就是空实例


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] little-cui closed issue #3709: 新老灰度发布配置不兼容?请确认生效逻辑

Posted by "little-cui (via GitHub)" <gi...@apache.org>.
little-cui closed issue #3709: 新老灰度发布配置不兼容?请确认生效逻辑
URL: https://github.com/apache/servicecomb-java-chassis/issues/3709


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] little-cui commented on issue #3709: 新老灰度发布配置不兼容?请确认生效逻辑

Posted by "little-cui (via GitHub)" <gi...@apache.org>.
little-cui commented on issue #3709:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3709#issuecomment-1478874087

   OK,是这个现象


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org