Merge pull request #12078 from SergeTupchiy/upgrade_grpc-erl_to_0.6.12

chore: upgrade grpc-erl to 0.6.12
This commit is contained in:
SergeTupchiy 2023-12-04 13:14:44 +02:00 committed by GitHub
commit e8f9c9c522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 18 deletions

View File

@ -274,16 +274,17 @@ t_write_failure(Config) ->
health_check_resource_down(Config), health_check_resource_down(Config),
case QueryMode of case QueryMode of
sync -> sync ->
case EnableBatch of %% Error (call timeout) is expected for both with_batch and without_batch.
true -> %% `health_check_resource_down(Config)` above calls health check and asserts
%% append to batch always returns ok %% that resource is already down.
?assertMatch(ok, send_message(Config, Data)); %% So, emqx_resource_manager updates it state to disconnected before returning health_check result.
false -> %% After that, emqx_resource_buffer_worker reads resource state and doesn't even attempt calling
?assertMatch( %% hstreamdb connector, since it is disconnected, see: emqx_resource_buffer_worker.erl:1163:
{error, {cannot_list_shards, {<<?STREAM>>, econnrefused}}}, %% ```
send_message(Config, Data) %% do_call_query(_QM, _Id, _Index, _Ref, _Query, _QueryOpts, _Data) ->
) %% ?RESOURCE_ERROR(not_connected, "resource not connected").
end; %% ```
?assertMatch({error, _}, send_message(Config, Data));
async -> async ->
%% TODO: async mode is not supported yet, %% TODO: async mode is not supported yet,
%% but it will return ok if calling emqx_resource_buffer_worker:async_query/3, %% but it will return ok if calling emqx_resource_buffer_worker:async_query/3,

View File

@ -50,11 +50,11 @@ init_per_suite(Conf) ->
emqx_config:delete_override_conf_files(), emqx_config:delete_override_conf_files(),
emqx_config:erase(gateway), emqx_config:erase(gateway),
emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT), emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_auth, emqx_auth_mnesia, emqx_gateway]), emqx_mgmt_api_test_util:init_suite([grpc, emqx_conf, emqx_auth, emqx_auth_mnesia, emqx_gateway]),
Conf. Conf.
end_per_suite(Conf) -> end_per_suite(Conf) ->
emqx_mgmt_api_test_util:end_suite([emqx_gateway, emqx_auth_mnesia, emqx_auth, emqx_conf]), emqx_mgmt_api_test_util:end_suite([emqx_gateway, emqx_auth_mnesia, emqx_auth, emqx_conf, grpc]),
Conf. Conf.
init_per_testcase(t_gateway_fail, Config) -> init_per_testcase(t_gateway_fail, Config) ->

View File

@ -69,7 +69,7 @@ init_per_suite(Config) ->
emqx_gateway_test_utils:load_all_gateway_apps(), emqx_gateway_test_utils:load_all_gateway_apps(),
emqx_config:erase(gateway), emqx_config:erase(gateway),
init_gateway_conf(), init_gateway_conf(),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_auth, emqx_auth_http, emqx_gateway]), emqx_mgmt_api_test_util:init_suite([grpc, emqx_conf, emqx_auth, emqx_auth_http, emqx_gateway]),
application:ensure_all_started(cowboy), application:ensure_all_started(cowboy),
emqx_gateway_auth_ct:start(), emqx_gateway_auth_ct:start(),
timer:sleep(500), timer:sleep(500),
@ -78,7 +78,9 @@ init_per_suite(Config) ->
end_per_suite(Config) -> end_per_suite(Config) ->
emqx_gateway_auth_ct:stop(), emqx_gateway_auth_ct:stop(),
emqx_config:erase(gateway), emqx_config:erase(gateway),
emqx_mgmt_api_test_util:end_suite([cowboy, emqx_conf, emqx_auth, emqx_auth_http, emqx_gateway]), emqx_mgmt_api_test_util:end_suite([
cowboy, emqx_conf, emqx_auth, emqx_auth_http, emqx_gateway, grpc
]),
Config. Config.
init_per_testcase(_Case, Config) -> init_per_testcase(_Case, Config) ->

View File

@ -69,7 +69,7 @@ init_per_suite(Config) ->
emqx_gateway_test_utils:load_all_gateway_apps(), emqx_gateway_test_utils:load_all_gateway_apps(),
init_gateway_conf(), init_gateway_conf(),
emqx_mgmt_api_test_util:init_suite([ emqx_mgmt_api_test_util:init_suite([
emqx_conf, emqx_auth, emqx_auth_http, emqx_gateway grpc, emqx_conf, emqx_auth, emqx_auth_http, emqx_gateway
]), ]),
meck:new(emqx_authz_file, [non_strict, passthrough, no_history, no_link]), meck:new(emqx_authz_file, [non_strict, passthrough, no_history, no_link]),
meck:expect(emqx_authz_file, create, fun(S) -> S end), meck:expect(emqx_authz_file, create, fun(S) -> S end),
@ -83,7 +83,7 @@ end_per_suite(Config) ->
ok = emqx_authz_test_lib:restore_authorizers(), ok = emqx_authz_test_lib:restore_authorizers(),
emqx_config:erase(gateway), emqx_config:erase(gateway),
emqx_mgmt_api_test_util:end_suite([ emqx_mgmt_api_test_util:end_suite([
emqx_gateway, emqx_auth_http, emqx_auth, emqx_conf emqx_gateway, emqx_auth_http, emqx_auth, emqx_conf, grpc
]), ]),
Config. Config.

View File

@ -0,0 +1,3 @@
Upgrade grpc-erl to 0.6.12
grpc-erl 0.6.12 fixes a potential deadlock that was possible because grpc client started dependent apps lazily.

View File

@ -57,7 +57,7 @@ defmodule EMQXUmbrella.MixProject do
{:rocksdb, github: "emqx/erlang-rocksdb", tag: "1.8.0-emqx-1", 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}, {:ekka, github: "emqx/ekka", tag: "0.15.16", override: true},
{:gen_rpc, github: "emqx/gen_rpc", tag: "3.2.2", override: true}, {:gen_rpc, github: "emqx/gen_rpc", tag: "3.2.2", override: true},
{:grpc, github: "emqx/grpc-erl", tag: "0.6.8", override: true}, {:grpc, github: "emqx/grpc-erl", tag: "0.6.12", override: true},
{:minirest, github: "emqx/minirest", tag: "1.3.14", override: true}, {:minirest, github: "emqx/minirest", tag: "1.3.14", override: true},
{:ecpool, github: "emqx/ecpool", tag: "0.5.4", override: true}, {:ecpool, github: "emqx/ecpool", tag: "0.5.4", override: true},
{:replayq, github: "emqx/replayq", tag: "0.3.7", override: true}, {:replayq, github: "emqx/replayq", tag: "0.3.7", override: true},

View File

@ -64,7 +64,7 @@
, {rocksdb, {git, "https://github.com/emqx/erlang-rocksdb", {tag, "1.8.0-emqx-1"}}} , {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"}}} , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.15.16"}}}
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.2.2"}}} , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.2.2"}}}
, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.8"}}} , {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.12"}}}
, {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.14"}}} , {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.3.14"}}}
, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.4"}}} , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.4"}}}
, {replayq, {git, "https://github.com/emqx/replayq.git", {tag, "0.3.7"}}} , {replayq, {git, "https://github.com/emqx/replayq.git", {tag, "0.3.7"}}}