Skip to content

Commit b734b0b

Browse files
mkuratczykmergify[bot]
authored andcommitted
-f -> -e; drop unneeded cases; typos
Also, remove the `undef` case which was only needed for RabbitMQ 3.7 and older. (cherry picked from commit ddb117f) (cherry picked from commit 5135d85)
1 parent ddfe633 commit b734b0b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/enable_feature_flag_command.ex

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
88
@behaviour RabbitMQ.CLI.CommandBehaviour
99

1010
def switches(), do: [experimental: :boolean]
11-
def aliases(), do: [f: :experimental]
11+
def aliases(), do: [e: :experimental]
1212

1313
def merge_defaults(args, opts), do: { args, Map.merge(%{experimental: false}, opts) }
1414

@@ -24,9 +24,6 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
2424

2525
def run(["all"], %{node: node_name}) do
2626
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}
3027
{:badrpc, _} = err -> err
3128
other -> other
3229
end
@@ -36,17 +33,13 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
3633
case {experimental, :rabbit_misc.rpc_call(node_name, :rabbit_feature_flags, :get_stability, [
3734
String.to_atom(feature_flag)
3835
])} do
39-
{_, {:badrpc, {:EXIT, {:undef, _}}}} -> {:error, :unsupported}
4036
{_, {:badrpc, _} = err} -> err
4137
{false, :experimental} ->
4238
IO.puts("Feature flag #{feature_flag} is experimental. If you understand the risk, use --experimental to enable it.")
4339
_ ->
4440
case :rabbit_misc.rpc_call(node_name, :rabbit_feature_flags, :enable, [
4541
String.to_atom(feature_flag)
4642
]) 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}
5043
{:badrpc, _} = err -> err
5144
other -> other
5245
end
@@ -70,7 +63,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do
7063
],
7164
[
7265
"--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!)"
7467
]
7568
]
7669
end

deps/rabbitmq_management/priv/www/js/tmpl/feature-flags.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<div class="hider">
8888
<% if (feature_flags.length > 0) { %>
8989
<p class="warning">
90-
Feature flags listed below are experimental. They should not be enabled in a produciton deployment.
90+
Feature flags listed below are experimental. They should not be enabled in a production deployment.
9191
</p>
9292
<table class="list">
9393
<thead>

0 commit comments

Comments
 (0)