From da626f6d297cb97bd0538f1ae1e63d6253426990 Mon Sep 17 00:00:00 2001 From: William Yang Date: Wed, 20 Sep 2023 12:07:26 +0200 Subject: [PATCH] feat(quic): bump to quicer 0.0.200 and emqtt 1.9.0 --- apps/emqx/rebar.config | 4 ++-- apps/emqx/rebar.config.script | 2 +- apps/emqx/src/emqx_listeners.erl | 4 ++-- apps/emqx/src/emqx_quic_connection.erl | 7 +++---- apps/emqx_retainer/rebar.config | 2 +- changes/ce/feat-11642.en.md | 1 + changes/ce/feat-11642.zh.md | 1 + mix.exs | 4 ++-- rebar.config | 2 +- rebar.config.erl | 2 +- 10 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 changes/ce/feat-11642.en.md create mode 100644 changes/ce/feat-11642.zh.md diff --git a/apps/emqx/rebar.config b/apps/emqx/rebar.config index 9e8816596..a32333714 100644 --- a/apps/emqx/rebar.config +++ b/apps/emqx/rebar.config @@ -45,7 +45,7 @@ {meck, "0.9.2"}, {proper, "1.4.0"}, {bbmustache, "1.10.0"}, - {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}} + {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}} ]}, {extra_src_dirs, [{"test", [recursive]}, {"integration_test", [recursive]}]} @@ -55,7 +55,7 @@ {meck, "0.9.2"}, {proper, "1.4.0"}, {bbmustache, "1.10.0"}, - {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}} + {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}} ]}, {extra_src_dirs, [{"test", [recursive]}]} ]} diff --git a/apps/emqx/rebar.config.script b/apps/emqx/rebar.config.script index 7aadb1f59..96d19b6d0 100644 --- a/apps/emqx/rebar.config.script +++ b/apps/emqx/rebar.config.script @@ -24,7 +24,7 @@ IsQuicSupp = fun() -> end, Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}}, -Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.114"}}}. +Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.200"}}}. Dialyzer = fun(Config) -> {dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config), diff --git a/apps/emqx/src/emqx_listeners.erl b/apps/emqx/src/emqx_listeners.erl index b95169d3c..60372e826 100644 --- a/apps/emqx/src/emqx_listeners.erl +++ b/apps/emqx/src/emqx_listeners.erl @@ -335,7 +335,7 @@ do_stop_listener(Type, Id, #{bind := ListenOn}) when Type == ws; Type == wss -> Error end; do_stop_listener(quic, Id, _Conf) -> - quicer:stop_listener(Id). + quicer:terminate_listener(Id). wait_listener_stopped(ListenOn) -> % NOTE @@ -461,7 +461,7 @@ do_start_listener(quic, ListenerName, #{bind := Bind} = Opts) -> Id = listener_id(quic, ListenerName), add_limiter_bucket(Id, Limiter), - quicer:start_listener( + quicer:spawn_listener( Id, ListenOn, {maps:from_list(ListenOpts), ConnectionOpts, StreamOpts} diff --git a/apps/emqx/src/emqx_quic_connection.erl b/apps/emqx/src/emqx_quic_connection.erl index 7ddf05af3..74c43d72d 100644 --- a/apps/emqx/src/emqx_quic_connection.erl +++ b/apps/emqx/src/emqx_quic_connection.erl @@ -229,10 +229,9 @@ streams_available(_C, {BidirCnt, UnidirCnt}, S) -> %% @doc callback for handling request when remote wants for more streams %% should cope with rate limiting -%% @TODO this is not going to get triggered in current version -%% ref: https://github.com/microsoft/msquic/issues/3120 --spec peer_needs_streams(quicer:connection_handle(), undefined, cb_state()) -> cb_ret(). -peer_needs_streams(_C, undefined, S) -> +-spec peer_needs_streams(quicer:connection_handle(), atom(), cb_state()) -> + cb_ret(). +peer_needs_streams(_C, _StreamType, S) -> ?SLOG(info, #{ msg => "ignore: peer need more streames", info => maps:with([conn_pid, ctrl_pid], S) }), diff --git a/apps/emqx_retainer/rebar.config b/apps/emqx_retainer/rebar.config index 6cee49bd3..24e01b66a 100644 --- a/apps/emqx_retainer/rebar.config +++ b/apps/emqx_retainer/rebar.config @@ -30,7 +30,7 @@ {profiles, [ {test, [ {deps, [ - {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}} + {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}} ]} ]} ]}. diff --git a/changes/ce/feat-11642.en.md b/changes/ce/feat-11642.en.md new file mode 100644 index 000000000..8b2cef9dc --- /dev/null +++ b/changes/ce/feat-11642.en.md @@ -0,0 +1 @@ +Updated to quicer version 0.0.200 in preparation for enabling openssl3 support for QUIC transport. diff --git a/changes/ce/feat-11642.zh.md b/changes/ce/feat-11642.zh.md new file mode 100644 index 000000000..a10a43eee --- /dev/null +++ b/changes/ce/feat-11642.zh.md @@ -0,0 +1 @@ +升级至 quicer 版本 0.0.200,为启用 OpenSSL3 以支持 QUIC 传输做准备。 diff --git a/mix.exs b/mix.exs index 26bbf10f8..54fec2c1b 100644 --- a/mix.exs +++ b/mix.exs @@ -64,7 +64,7 @@ defmodule EMQXUmbrella.MixProject do {:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true}, # maybe forbid to fetch quicer {:emqtt, - github: "emqx/emqtt", tag: "1.8.7", override: true, system_env: maybe_no_quic_env()}, + github: "emqx/emqtt", tag: "1.9.0", override: true, system_env: maybe_no_quic_env()}, {:rulesql, github: "emqx/rulesql", tag: "0.1.7"}, {:observer_cli, "1.7.1"}, {:system_monitor, github: "ieQu1/system_monitor", tag: "3.0.3"}, @@ -835,7 +835,7 @@ defmodule EMQXUmbrella.MixProject do defp quicer_dep() do if enable_quicer?(), # in conflict with emqx and emqtt - do: [{:quicer, github: "emqx/quic", tag: "0.0.114", override: true}], + do: [{:quicer, github: "emqx/quic", tag: "0.0.200", override: true}], else: [] end diff --git a/rebar.config b/rebar.config index 1a0103c74..03833c161 100644 --- a/rebar.config +++ b/rebar.config @@ -69,7 +69,7 @@ , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.4"}}} , {replayq, {git, "https://github.com/emqx/replayq.git", {tag, "0.3.7"}}} , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}} - , {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.8.7"}}} + , {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.9.0"}}} , {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.7"}}} , {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x , {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}} diff --git a/rebar.config.erl b/rebar.config.erl index c81c40eb7..875eec222 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -39,7 +39,7 @@ bcrypt() -> {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.1"}}}. quicer() -> - {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.114"}}}. + {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.200"}}}. jq() -> {jq, {git, "https://github.com/emqx/jq", {tag, "v0.3.10"}}}.