@@ -2072,78 +2072,6 @@ do_sync_feature_flags_with_node([FeatureFlag | Rest]) ->
20722072do_sync_feature_flags_with_node ([]) ->
20732073 ok .
20742074
2075- <<<<<<< HEAD
2076- - spec get_forced_feature_flag_names () -> [feature_name ()] | undefined .
2077- % % @private
2078- % % @doc
2079- % % Returns the (possibly empty) list of feature flags the user want
2080- % % to enable out-of-the-box when starting a node for the first time.
2081- % %
2082- % % Without this, the default is to enable all the supported feature
2083- % % flags.
2084- % %
2085- % % There are two ways to specify that list:
2086- % % <ol>
2087- % % <li>Using the `$RABBITMQ_FEATURE_FLAGS' environment variable; for
2088- % % instance `RABBITMQ_FEATURE_FLAGS=quorum_queue,mnevis'.</li>
2089- % % <li>Using the `forced_feature_flags_on_init' configuration parameter;
2090- % % for instance
2091- % % `{rabbit, [{forced_feature_flags_on_init, [quorum_queue, mnevis]}]}'.</li>
2092- % % </ol>
2093- % %
2094- % % The environment variable has precedence over the configuration
2095- % % parameter.
2096-
2097- get_forced_feature_flag_names () ->
2098- Ret = case get_forced_feature_flag_names_from_env () of
2099- undefined -> get_forced_feature_flag_names_from_config ();
2100- List -> List
2101- end ,
2102- case Ret of
2103- undefined -> ok ;
2104- [] -> rabbit_log_feature_flags :info (
2105- " Feature flags: automatic enablement of feature "
2106- " flags disabled (i.e. none will be enabled "
2107- " automatically)" );
2108- _ -> rabbit_log_feature_flags :info (
2109- " Feature flags: automatic enablement of feature "
2110- " flags limited to the following list: ~p " , [Ret ])
2111- end ,
2112- Ret .
2113-
2114- - spec get_forced_feature_flag_names_from_env () -> [feature_name ()] | undefined .
2115- % % @private
2116-
2117- get_forced_feature_flag_names_from_env () ->
2118- case rabbit_prelaunch :get_context () of
2119- #{forced_feature_flags_on_init := ForcedFFs }
2120- when is_list (ForcedFFs ) ->
2121- ForcedFFs ;
2122- _ ->
2123- undefined
2124- end .
2125-
2126- - spec get_forced_feature_flag_names_from_config () -> [feature_name ()] | undefined .
2127- % % @private
2128-
2129- get_forced_feature_flag_names_from_config () ->
2130- Value = application :get_env (rabbit ,
2131- forced_feature_flags_on_init ,
2132- undefined ),
2133- case Value of
2134- undefined ->
2135- Value ;
2136- _ when is_list (Value ) ->
2137- case lists :all (fun is_atom /1 , Value ) of
2138- true -> Value ;
2139- false -> undefined
2140- end ;
2141- _ ->
2142- undefined
2143- end .
2144-
2145- =======
2146- >>>>>>> 9 fb4e6754e (rabbit_feature_flags : Support virgin node init with feature flags v2 )
21472075- spec verify_which_feature_flags_are_actually_enabled () ->
21482076 ok | {error , any ()} | no_return ().
21492077% % @private
0 commit comments