Merge pull request #8731 from emqx/copy-of-master

merge master into ee5.0
This commit is contained in:
Xinyu Liu 2022-08-16 10:49:10 +08:00 committed by GitHub
commit 9050aa6468
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 14 deletions

View File

@ -1,3 +1,9 @@
# 5.0.6
## Bug fixes
* Remove the needless `will_msg` field from the client API. [#8721](https://github.com/emqx/emqx/pull/8721)
# 5.0.5
## Bug fixes

View File

@ -2094,9 +2094,9 @@ sc(Type, Meta) -> hoconsc:mk(Type, Meta).
map(Name, Type) -> hoconsc:map(Name, Type).
ref(Field) -> hoconsc:ref(?MODULE, Field).
ref(StructName) -> hoconsc:ref(?MODULE, StructName).
ref(Module, Field) -> hoconsc:ref(Module, Field).
ref(Module, StructName) -> hoconsc:ref(Module, StructName).
mk_duration(Desc, OverrideMeta) ->
DefaultMeta = #{

View File

@ -538,7 +538,6 @@ fields(client) ->
})},
{username, hoconsc:mk(binary(), #{desc => <<"User name of client when connecting">>})},
{mountpoint, hoconsc:mk(binary(), #{desc => <<"Topic mountpoint">>})},
{will_msg, hoconsc:mk(binary(), #{desc => <<"Client will message">>})},
{zone,
hoconsc:mk(binary(), #{
desc =>
@ -885,7 +884,8 @@ format_channel_info({_, ClientInfo0, ClientStats}) ->
[memory, next_pkt_id, total_heap_size],
maps:from_list(ClientStats)
),
ClientInfoMap0 = maps:fold(fun take_maps_from_inner/3, #{}, ClientInfo2),
ClientInfo3 = maps:remove(will_msg, ClientInfo2),
ClientInfoMap0 = maps:fold(fun take_maps_from_inner/3, #{}, ClientInfo3),
{IpAddress, Port} = peername_dispart(maps:get(peername, ClientInfoMap0)),
Connected = maps:get(conn_state, ClientInfoMap0) =:= connected,
ClientInfoMap1 = maps:merge(StatsMap, ClientInfoMap0),

37
build
View File

@ -17,10 +17,29 @@ fi
PROFILE_ARG="$1"
ARTIFACT="$2"
if [[ "${PROFILE:-${PROFILE_ARG}}" != "$PROFILE_ARG" ]]; then
echo "PROFILE env var is set to '$PROFILE', but '$0' arg1 is '$1'"
is_enterprise() {
case "$1" in
*enterprise*)
echo 'yes'
;;
*)
echo 'no'
;;
esac
}
PROFILE_ENV="${PROFILE:-${PROFILE_ARG}}"
case "$(is_enterprise "$PROFILE_ARG"),$(is_enterprise "$PROFILE_ENV")" in
'yes,yes')
true
;;
'no,no')
true
;;
*)
echo "PROFILE env var is set to '$PROFILE_ENV', but '$0' arg1 is '$PROFILE_ARG'"
exit 1
fi
;;
esac
# make sure PROFILE is exported, it is needed by rebar.config.erl
PROFILE=$PROFILE_ARG
@ -91,11 +110,11 @@ make_docs() {
else
libs_dir3=''
fi
case $PROFILE in
emqx-enterprise)
case "$(is_enterprise "$PROFILE")" in
'yes')
SCHEMA_MODULE='emqx_ee_conf_schema'
;;
*)
'no')
SCHEMA_MODULE='emqx_conf_schema'
;;
esac
@ -290,11 +309,11 @@ export_release_vars() {
local erl_opts=()
case "$profile" in
*enterprise*)
case "$(is_enterprise "$profile")" in
'yes')
erl_opts+=( "{d, 'EMQX_RELEASE_EDITION', ee}" )
;;
*)
'no')
erl_opts+=( "{d, 'EMQX_RELEASE_EDITION', ce}" )
;;
esac