timwind opened a new issue, #4995:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4995

   ### Steps to Reproduce
   
   一、问题
   1. 设置versionRule=0.0.0.0+,而非latest
   2. B作为服务端,高版本离线,低版本在线,且低版本存在新接口,
   A作为消费端,测试调用新接口的情况,报契约问题;
   将B的低版本号改为更高版本号,测试通过。
   
   二、怀疑原因
   在findLatest函数中只加载了最大版本的契约,不符合文档描述
   findLatest:170, MicroserviceVersionRule 
(org.apache.servicecomb.registry.consumer)
   initData:150, MicroserviceVersionRule 
(org.apache.servicecomb.registry.consumer)
   createDataByOtherRule:229, MicroserviceVersionRule 
(org.apache.servicecomb.registry.consumer)
   
   日志打印:
   [oup0-1-thread-1] [            MicroserviceVersions] --- create 
MicroserviceVersionRule, appId=XXX, microserviceName=XXX, versionRule=0.0.0.0+.
   
   三、文档描述
   
https://servicecomb.incubator.apache.org/references/java-chassis/2.x/zh_CN/build-consumer/with-contract.html
   version-rule是版本匹配规则,有四种格式:
   精确版本匹配:例如version-rule: 0.0.1,表示只匹配版本号为0.0.1的服务提供者
   后续版本匹配:例如version-rule: 1.0.0+,表示匹配版本号大于或等于1.0.0的服务提供者
   最新版本:version-rule: latest,表示匹配最新版本的服务提供者
   版本范围:例如1.0.0-2.0.2,表示匹配版本号在1.0.0至2.0.2之间的服务提供者,包含1.0.0和2.0.2
   此配置项默认为latest
   
   ### Expected Behavior
   
   期望在配置0+的versionRule时,能加载所有契约或加载在线实例的契约
   
   ### Servicecomb Version
   
   2.8.24
   
   ### Additional Context
   
   _No response_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to