From dd5807b797afb33008a88df778fde0b936fd5d79 Mon Sep 17 00:00:00 2001 From: William Yang Date: Fri, 20 Oct 2023 12:17:49 +0200 Subject: [PATCH] fix(gen_rpc): ensure client/server use same driver Also bump to gen_rpc 3.2.1 --- apps/emqx/rebar.config | 2 +- apps/emqx_conf/src/emqx_conf_schema.erl | 6 +++--- mix.exs | 2 +- rebar.config | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/emqx/rebar.config b/apps/emqx/rebar.config index 544848889..63edd1e23 100644 --- a/apps/emqx/rebar.config +++ b/apps/emqx/rebar.config @@ -29,7 +29,7 @@ {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.2"}}}, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.7"}}}, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.15.16"}}}, - {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.2.0"}}}, + {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.2.1"}}}, {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.39.16"}}}, {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.3"}}}, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}, diff --git a/apps/emqx_conf/src/emqx_conf_schema.erl b/apps/emqx_conf/src/emqx_conf_schema.erl index 7ec5348fc..382d25de1 100644 --- a/apps/emqx_conf/src/emqx_conf_schema.erl +++ b/apps/emqx_conf/src/emqx_conf_schema.erl @@ -1150,7 +1150,7 @@ translation("emqx") -> ]; translation("gen_rpc") -> [ - {"default_client_driver", fun tr_default_config_driver/1}, + {"default_client_driver", fun tr_gen_rpc_default_client_driver/1}, {"ssl_client_options", fun tr_gen_rpc_ssl_options/1}, {"ssl_server_options", fun tr_gen_rpc_ssl_options/1}, {"socket_ip", fun(Conf) -> @@ -1223,8 +1223,8 @@ tr_vm_msacc_collector(Conf) -> collector_enabled(enabled, Collector) -> [Collector]; collector_enabled(disabled, _) -> []. -tr_default_config_driver(Conf) -> - conf_get("rpc.driver", Conf). +tr_gen_rpc_default_client_driver(Conf) -> + conf_get("rpc.protocol", Conf). tr_gen_rpc_ssl_options(Conf) -> Ciphers = conf_get("rpc.ciphers", Conf), diff --git a/mix.exs b/mix.exs index 07f6b0209..9851fb46f 100644 --- a/mix.exs +++ b/mix.exs @@ -56,7 +56,7 @@ defmodule EMQXUmbrella.MixProject do {:esockd, github: "emqx/esockd", tag: "5.9.7", override: true}, {:rocksdb, github: "emqx/erlang-rocksdb", tag: "1.8.0-emqx-1", override: true}, {:ekka, github: "emqx/ekka", tag: "0.15.16", override: true}, - {:gen_rpc, github: "emqx/gen_rpc", tag: "3.2.0", override: true}, + {:gen_rpc, github: "emqx/gen_rpc", tag: "3.2.1", override: true}, {:grpc, github: "emqx/grpc-erl", tag: "0.6.8", override: true}, {:minirest, github: "emqx/minirest", tag: "1.3.13", override: true}, {:ecpool, github: "emqx/ecpool", tag: "0.5.4", override: true}, diff --git a/rebar.config b/rebar.config index e2e1a7cf0..753487a75 100644 --- a/rebar.config +++ b/rebar.config @@ -63,7 +63,7 @@ , {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.7"}}} , {rocksdb, {git, "https://github.com/emqx/erlang-rocksdb", {tag, "1.8.0-emqx-1"}}} , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.15.16"}}} - , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.2.0"}}} + , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.2.1"}}} , {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.8"}}} , {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.13"}}} , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.4"}}}