shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[Task] Consolidate etcd dependencies into one

Open hgaol opened this issue 3 years ago • 10 comments

Description

Currently, there're 2 different etcd dependencies in Shenyu. And Can not even start admin by etcd registration.

In admin, it now uses

        <dependency>
            <groupId>io.etcd</groupId>
            <artifactId>jetcd-core</artifactId>
            <version>${jetcd-core.version}</version>
        </dependency>

In shenyu-register-client-server-etcd, it now uses

 <dependency>
            <groupId>com.coreos</groupId>
            <artifactId>jetcd-core</artifactId>
            <version>${jetcd.version}</version>
        </dependency>

When start admin, it will occur below errors because of this issue.

Description:

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

    com.coreos.jetcd.internal.impl.ClientConnectionManager.defaultChannelBuilder(ClientConnectionManager.java:187)

The following method did not exist:

    'io.grpc.netty.NettyChannelBuilder io.grpc.netty.NettyChannelBuilder.usePlaintext(boolean)'

The calling method's class, com.coreos.jetcd.internal.impl.ClientConnectionManager, was loaded from the following location:

    jar:file:/Users/hgao/.m2/repository/com/coreos/jetcd-core/0.0.2/jetcd-core-0.0.2.jar!/com/coreos/jetcd/internal/impl/ClientConnectionManager.class

The called method's class, io.grpc.netty.NettyChannelBuilder, is available from the following locations:

    jar:file:/Users/hgao/.m2/repository/io/grpc/grpc-netty/1.27.1/grpc-netty-1.27.1.jar!/io/grpc/netty/NettyChannelBuilder.class

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

    io.grpc.netty.NettyChannelBuilder: file:/Users/hgao/.m2/repository/io/grpc/grpc-netty/1.27.1/grpc-netty-1.27.1.jar
    io.grpc.internal.AbstractManagedChannelImplBuilder: file:/Users/hgao/.m2/repository/io/grpc/grpc-core/1.27.1/grpc-core-1.27.1.jar
    io.grpc.ManagedChannelBuilder: file:/Users/hgao/.m2/repository/io/grpc/grpc-api/1.27.1/grpc-api-1.27.1.jar

It's better to consolidate to only one dependency for etcd, and the preference is https://mvnrepository.com/artifact/io.etcd/jetcd-core/0.7.3.

Task List

  1. add io.etcd.jetcd into dependency management part in root pom file.
  2. remove the other etcd dependency in whole project and replace by above one.
  3. refine the code if any error.
  4. test the whole process to make sure it works well. The whole process includes starting admin, bootstrap and an example like http example application using etcd as registration configuration.

hgaol avatar Aug 05 '22 07:08 hgaol

please assign these four tasks to me

mahaitao617 avatar Aug 05 '22 08:08 mahaitao617

please assign these four tasks to me

Good luck to you!

hgaol avatar Aug 05 '22 11:08 hgaol

please assign these four tasks to me

Good luck to you!

ths

mahaitao617 avatar Aug 06 '22 01:08 mahaitao617

Hi @mahaitao617 , any update about this task? Or any help needed?

hgaol avatar Aug 12 '22 09:08 hgaol

hello,can you assign these four tasks to me~

huanccwang avatar Aug 12 '22 10:08 huanccwang

hello,can you assign these four tasks to me~

ok

mahaitao617 avatar Aug 15 '22 13:08 mahaitao617

hello,can you assign these four tasks to me~

ok

I have push pr~

huanccwang avatar Aug 15 '22 13:08 huanccwang

Hi @wanghuan0606 , can you run http-example successfully? I can't run it without changing the grpc version to a higher version. Can you try it? Thanks!

hgaol avatar Aug 16 '22 01:08 hgaol

ok~I'll try it tonight.

获取 Outlook for iOShttps://aka.ms/o0ukef


发件人: Han Gao @.> 发送时间: Tuesday, August 16, 2022 9:52:26 AM 收件人: apache/shenyu @.> 抄送: huanccwang @.>; Mention @.> 主题: Re: [apache/shenyu] [Task] Consolidate etcd dependencies into one (Issue #3807)

Hi @wanghuan0606https://github.com/wanghuan0606 , can you run http-example successfully? I can't run it without changing the grpc version to a higher version. Can you try it? Thanks!

― Reply to this email directly, view it on GitHubhttps://github.com/apache/shenyu/issues/3807#issuecomment-1216054323, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOYKRA6FEZYSRKW625GJBZTVZLX5VANCNFSM55VDA6XQ. You are receiving this because you were mentioned.Message ID: @.***>

huanccwang avatar Aug 16 '22 01:08 huanccwang

Hi @wanghuan0606 , can you run http-example successfully? I can't run it without changing the grpc version to a higher version. Can you try it? Thanks!

Hello, I can run http-example successfully without any other operate.

huanccwang avatar Aug 16 '22 15:08 huanccwang