@@ -8,7 +8,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
8
8
@ behaviour RabbitMQ.CLI.CommandBehaviour
9
9
10
10
def switches ( ) , do: [ experimental: :boolean ]
11
- def aliases ( ) , do: [ f : :experimental ]
11
+ def aliases ( ) , do: [ e : :experimental ]
12
12
13
13
def merge_defaults ( args , opts ) , do: { args , Map . merge ( % { experimental: false } , opts ) }
14
14
@@ -24,9 +24,6 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
24
24
25
25
def run ( [ "all" ] , % { node: node_name } ) do
26
26
case :rabbit_misc . rpc_call ( node_name , :rabbit_feature_flags , :enable_all , [ ] ) do
27
- # Server does not support feature flags, consider none are available.
28
- # See rabbitmq/rabbitmq-cli#344 for context. MK.
29
- { :badrpc , { :EXIT , { :undef , _ } } } -> { :error , :unsupported }
30
27
{ :badrpc , _ } = err -> err
31
28
other -> other
32
29
end
@@ -36,17 +33,13 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
36
33
case { experimental , :rabbit_misc . rpc_call ( node_name , :rabbit_feature_flags , :get_stability , [
37
34
String . to_atom ( feature_flag )
38
35
] ) } do
39
- { _ , { :badrpc , { :EXIT , { :undef , _ } } } } -> { :error , :unsupported }
40
36
{ _ , { :badrpc , _ } = err } -> err
41
37
{ false , :experimental } ->
42
38
IO . puts ( "Feature flag #{ feature_flag } is experimental. If you understand the risk, use --experimental to enable it." )
43
39
_ ->
44
40
case :rabbit_misc . rpc_call ( node_name , :rabbit_feature_flags , :enable , [
45
41
String . to_atom ( feature_flag )
46
42
] ) do
47
- # Server does not support feature flags, consider none are available.
48
- # See rabbitmq/rabbitmq-cli#344 for context. MK.
49
- { :badrpc , { :EXIT , { :undef , _ } } } -> { :error , :unsupported }
50
43
{ :badrpc , _ } = err -> err
51
44
other -> other
52
45
end
@@ -70,7 +63,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
70
63
] ,
71
64
[
72
65
"--experimental" ,
73
- "required to enable experimental feature flags (make sure you understand the risks!)) "
66
+ "required to enable experimental feature flags (make sure you understand the risks!)"
74
67
]
75
68
]
76
69
end
0 commit comments