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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rabbit_feature_flags: Support relative setting in forced_feature_flags_on_init #12736

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions deps/rabbit/src/rabbit_ff_controller.erl
Original file line number Diff line number Diff line change
Expand Up @@ -850,16 +850,23 @@ get_forced_feature_flag_names_from_env() ->
end.

-spec get_forced_feature_flag_names_from_config() -> Ret when
Ret :: {ok, FeatureNames | undefined},
FeatureNames :: [rabbit_feature_flags:feature_name()].
Ret :: {ok, Abs | Rel | undefined},
Abs :: [rabbit_feature_flags:feature_name()],
Rel :: {rel,
[rabbit_feature_flags:feature_name()],
[rabbit_feature_flags:feature_name()]}.
%% @private

get_forced_feature_flag_names_from_config() ->
Value = application:get_env(
rabbit, forced_feature_flags_on_init, undefined),
case Value of
undefined -> {ok, Value};
_ when is_list(Value) -> {ok, Value}
undefined ->
{ok, Value};
_ when is_list(Value) ->
{ok, Value};
{rel, Plus, Minus} when is_list(Plus) andalso is_list(Minus) ->
{ok, Value}
end.

-spec enable_required_task() -> Ret when
Expand Down
Loading