Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

0602 add enable as an alias for enabled #10926

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/emqx/src/emqx_schema.erl
Expand Up @@ -301,6 +301,8 @@ fields("persistent_session_store") ->
boolean(),
#{
default => false,
%% TODO(5.2): change field name to 'enable' and keep 'enabled' as an alias
aliases => [enable],
desc => ?DESC(persistent_session_store_enabled)
}
)},
Expand Down Expand Up @@ -1989,6 +1991,8 @@ base_listener(Bind) ->
boolean(),
#{
default => true,
%% TODO(5.2): change field name to 'enable' and keep 'enabled' as an alias
aliases => [enable],
desc => ?DESC(fields_listener_enabled)
}
)},
Expand Down
8 changes: 6 additions & 2 deletions apps/emqx_conf/src/emqx_conf_app.erl
Expand Up @@ -210,9 +210,13 @@ sync_data_from_node(Node) ->
{ok, DataBin} ->
case zip:unzip(DataBin, [{cwd, emqx:data_dir()}]) of
{ok, []} ->
?SLOG(debug, #{node => Node, msg => "sync_data_from_node_ignore"});
?SLOG(debug, #{node => Node, msg => "sync_data_from_node_empty_response"});
{ok, Files} ->
?SLOG(debug, #{node => Node, msg => "sync_data_from_node_ok", files => Files})
?SLOG(debug, #{
node => Node,
msg => "sync_data_from_node_non_empty_response",
files => Files
})
end,
ok;
Error ->
Expand Down
5 changes: 5 additions & 0 deletions changes/ce/feat-10926.en.md
@@ -0,0 +1,5 @@
Allow 'enable' as well as 'enabled' as the state flag for listeners.

Prior to this change, listener can be enable/disabled by setting the 'true' or 'false' on the 'enabled' config.
This is slightly different naming comparing to other state flags in the system.
No the 'enable' flag is added as an aliase on listeners.