chore: temporarily revert `NO_DOC` changes to fields with default value = false

These will be dealt with in follow up PRs, by allowing the parent struct to be set to a
special `disabled` value in such cases.
This commit is contained in:
Thales Macedo Garitezi 2024-07-24 16:40:30 -03:00
parent d7112921a6
commit b3074144cc
10 changed files with 26 additions and 17 deletions

View File

@ -388,7 +388,7 @@ fields("flapping_detect") ->
boolean(),
#{
default => false,
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
desc => ?DESC(flapping_detect_enable)
}
)},
@ -455,7 +455,7 @@ fields("overload_protection") ->
boolean(),
#{
desc => ?DESC(overload_protection_enable),
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
default => false
}
)},
@ -1673,7 +1673,7 @@ fields("durable_sessions") ->
sc(
boolean(), #{
desc => ?DESC(durable_sessions_enable),
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
default => false
}
)},
@ -2426,7 +2426,7 @@ client_ssl_opts_schema(Defaults) ->
boolean(),
#{
default => false,
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
desc => ?DESC(client_ssl_opts_schema_enable)
}
)},

View File

@ -1271,6 +1271,11 @@ log_handler_common_confs(Handler, Default) ->
EnvValue = os:getenv("EMQX_DEFAULT_LOG_HANDLER"),
Enable = lists:member(EnvValue, EnableValues),
LevelDesc = maps:get(level_desc, Default, "common_handler_level"),
EnableImportance =
case Enable of
true -> ?IMPORTANCE_NO_DOC;
false -> ?IMPORTANCE_MEDIUM
end,
[
{"level",
sc(
@ -1287,7 +1292,7 @@ log_handler_common_confs(Handler, Default) ->
#{
default => Enable,
desc => ?DESC("common_handler_enable"),
importance => ?IMPORTANCE_NO_DOC
importance => EnableImportance
}
)},
{"formatter",

View File

@ -47,7 +47,7 @@ common_backend_schema(Backend) ->
mk(
boolean(), #{
desc => ?DESC(backend_enable),
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
required => false,
default => false
}

View File

@ -66,7 +66,7 @@ fields(file_transfer) ->
boolean(),
#{
desc => ?DESC("enable"),
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
required => false,
default => false
}

View File

@ -72,7 +72,7 @@ fields("otel_metrics") ->
boolean(),
#{
default => false,
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
required => true,
desc => ?DESC(enable)
}
@ -105,7 +105,8 @@ fields("otel_logs") ->
#{
default => false,
desc => ?DESC(enable),
importance => ?IMPORTANCE_NO_DOC
%% importance => ?IMPORTANCE_NO_DOC
importance => ?IMPORTANCE_HIGH
}
)},
{max_queue_size,
@ -144,7 +145,8 @@ fields("otel_traces") ->
#{
default => false,
desc => ?DESC(enable),
importance => ?IMPORTANCE_NO_DOC
%% importance => ?IMPORTANCE_NO_DOC
importance => ?IMPORTANCE_HIGH
}
)},
{max_queue_size,

View File

@ -78,7 +78,7 @@ fields(push_gateway) ->
#{
default => false,
required => true,
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
desc => ?DESC(push_gateway_enable)
}
)},
@ -230,7 +230,7 @@ fields(legacy_deprecated_setting) ->
#{
default => false,
required => true,
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
desc => ?DESC(legacy_enable)
}
)},

View File

@ -42,7 +42,7 @@ fields() ->
[
{enable,
?HOCON(boolean(), #{
importance => ?IMPORTANCE_NO_DOC,
%% importance => ?IMPORTANCE_NO_DOC,
default => false,
require => true,
desc => ?DESC(enable)

View File

@ -27,7 +27,8 @@ roots() ->
fields("slow_subs") ->
[
{enable, sc(boolean(), false, enable, ?IMPORTANCE_NO_DOC)},
%% {enable, sc(boolean(), false, enable, ?IMPORTANCE_NO_DOC)},
{enable, sc(boolean(), false, enable)},
{threshold,
sc(
%% not used in a `receive ... after' block, just timestamp comparison
@ -67,5 +68,5 @@ desc(_) ->
sc(Type, Default, Desc) ->
?HOCON(Type, #{default => Default, desc => ?DESC(Desc)}).
sc(Type, Default, Desc, Importance) ->
?HOCON(Type, #{default => Default, desc => ?DESC(Desc), importance => Importance}).
%% sc(Type, Default, Desc, Importance) ->
%% ?HOCON(Type, #{default => Default, desc => ?DESC(Desc), importance => Importance}).

View File

@ -16,6 +16,7 @@ gateway.exproto {
## Configurations for request to ConnectionHandler service
handler {
address = "http://127.0.0.1:9001"
ssl_options {enable = false}
}
listeners.tcp.default {

View File

@ -10,7 +10,7 @@ plugins {
## Note: name and version should be what it is in the plugin application
name_vsn = "my_acl-0.1.0",
},
{name_vsn = "my_rule-0.1.1"}
{name_vsn = "my_rule-0.1.1", enable = false}
]
## The installation directory for the external plugins