sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.81k stars 1.17k forks source link

请问为什么 sofaboot-dependencies 的sofa-rpc-all一直固定在 5.8.3 #1368

Closed Jiiiiiin closed 9 months ago

Jiiiiiin commented 9 months ago

Your question

  1. 请问为什么 sofaboot-dependencies 的sofa-rpc-all一直固定在 5.8.3,目前我们使用的sofastack对应版本为:
  <parent>
    <groupId>com.alipay.sofa</groupId>
    <artifactId>sofaboot-dependencies</artifactId>
    <version>3.20.0</version>
    <relativePath/>
  </parent>

<properties>
    <sofa.boot.version>3.20.0</sofa.boot.version>
    <spring-boot.version>2.7.14</spring-boot.version>

但是我们发现sofaboot-dependencies 的sofa-rpc-all一直固定在 5.8.3

2.针对 rpc-sofa-boot-starter 和 sofa-rpc-all的关系是?我们看到 rpc-sofa-boot-starter在sofaboot-dependencies中一直和sofa-boot保持一致,比如上面的3.20.0,他们3者之间的映射关系也没有一个地方能查询到?

为什么我们会关系这个问题,在于,sofa-registry 开源版本或者说核心版本并没有一个简单的dashboard,类似 nacos,所以我们注册中心使用的是nacos,而nacos 服务端目前升级到2.2.3 (或者说我们想把注册中心,或者跟着社区将上游依赖进行同步),但是sofa默认文档中并没有针对 nacos-client 和 sofa-rpc相关组件的版本映射列表(已有的列表长期停滞在1.x)

Your advice

我们建议针对nacos和sofa-rpc的结合进行响应的定期文档更新

Environment

谢谢回复

EvenLjj commented 9 months ago

@Jiiiiiin rpc-sofa-boot-starter 设计初衷还是希望开箱即用,不需要用户关心具体 sofa-rpc-all 版本,统一有 SOFABoot 管理,starter版本和 SOFABoot 版本一致就会保证兼容性。SOFABoot 3.x 版本 中 SOFARPC 版本升级应该是遗漏了,目前可以直接升级下最新版本,这个我去提下。SOFABoot 4.x 版本中 SOFARPC 版本已经是最新版了 当前 SOFARPC 最新版本 nacas 版本已经是 2.x 系列了,会定期去更新社区的最新稳定版本,有兴趣的话也可以提交 PR 过来升级版本。

Jiiiiiin commented 9 months ago

@EvenLjj 好的老师,等把手上项目交付,计划是要参与sofa项目,先从阅读相关代码开始吧。您的回复针对这种“多模块、团队”项目如何进行聚合依赖管理的思路,谢谢。

image

上面这个是测试升级到最新的 sofa-rpc-all 测试的结果是通过(通过排除rpc-sofa-boot-starter中的sofa-rpc-all依赖,手动指定依赖);

但是另外因为我们nacos-server升级到2.2.3,想着配套的 nacos-client 也升级到对应版本,但是实测是不行,会爆出如下错误,当然近期sofa-boot 4.x(包括生态升级列表中,我看到nacos-client标注的也仅仅是2.0.3 https://zhuanlan.zhihu.com/p/647221821)难道2.2.x这个版本其中存在什么特殊差异吗?老师

2023-09-13 22:27:02,572 ERROR [] [,,] [,,,,] [main] o.s.b.d.LoggingFailureAnalysisReporter:40

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    com.alibaba.nacos.spring.context.properties.config.NacosConfigurationPropertiesBinder.bind(NacosConfigurationPropertiesBinder.java:106)

The following method did not exist:

    com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties.yaml()Z

The calling method's class, com.alibaba.nacos.spring.context.properties.config.NacosConfigurationPropertiesBinder, was loaded from the following location:

    jar:file:/Users/xiaobai/.m2/repository/com/alibaba/nacos/nacos-spring-context/1.1.1/nacos-spring-context-1.1.1.jar!/com/alibaba/nacos/spring/context/properties/config/NacosConfigurationPropertiesBinder.class

The called method's class, com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties, is available from the following locations:

    jar:file:/Users/xiaobai/.m2/repository/com/alibaba/nacos/nacos-client/2.2.3/nacos-client-2.2.3.jar!/com/alibaba/nacos/api/config/annotation/NacosConfigurationProperties.class

The called method's class hierarchy was loaded from the following locations:

    com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties: file:/Users/xiaobai/.m2/repository/com/alibaba/nacos/nacos-client/2.2.3/nacos-client-2.2.3.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.alibaba.nacos.spring.context.properties.config.NacosConfigurationPropertiesBinder and com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties

2023-09-13 22:27:02,573 WARN  [] [,,] [,,,,] [Thread-10] c.a.n.c.n.NotifyCenter:136 [NotifyCenter] Start destroying Publisher
2023-09-13 22:27:02,573 WARN  [] [,,] [,,,,] [Thread-10] c.a.n.c.n.NotifyCenter:153 [NotifyCenter] Destruction of the end
2023-09-13 22:27:02,573 WARN  [] [,,] [,,,,] [Thread-5] c.a.n.c.h.HttpClientBeanHolder:102 [HttpClientBeanHolder] Start destroying common HttpClient
2023-09-13 22:27:02,574 WARN  [] [,,] [,,,,] [Thread-5] c.a.n.c.h.HttpClientBeanHolder:111 [HttpClientBeanHolder] Destruction of the end

当然貌似是因为nacos-config导致无法启动。 老师也没有什么思路?目前nacos-config相关starter为最新,当然不调整nacos-client是没有问题的,这个好像和sofa无关,我要去隔壁反馈是吧 哈哈。

是不是因为非纯净版本导致的一些“后遗症” > https://nacos.io/zh-cn/docs/v2/guide/user/sdk.html 等项目不忙我在找找原因吧