Преглед на файлове

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.
Thales Macedo Garitezi преди 1 година
родител
ревизия
b3074144cc

+ 4 - 4
apps/emqx/src/emqx_schema.erl

@@ -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)
                     }
                 )},

+ 6 - 1
apps/emqx_conf/src/emqx_conf_schema.erl

@@ -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",

+ 1 - 1
apps/emqx_dashboard_sso/src/emqx_dashboard_sso_schema.erl

@@ -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
                 }

+ 1 - 1
apps/emqx_ft/src/emqx_ft_schema.erl

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

+ 5 - 3
apps/emqx_opentelemetry/src/emqx_otel_schema.erl

@@ -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,

+ 2 - 2
apps/emqx_prometheus/src/emqx_prometheus_schema.erl

@@ -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)
                 }
             )},

+ 1 - 1
apps/emqx_psk/src/emqx_psk_schema.erl

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

+ 4 - 3
apps/emqx_slow_subs/src/emqx_slow_subs_schema.erl

@@ -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}).

+ 1 - 0
rel/config/examples/gateway.exproto.conf.example

@@ -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 {

+ 1 - 1
rel/config/examples/plugins.conf.example

@@ -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