diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /lib/feature.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 3bba4be7514..ca91d86c199 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -3,7 +3,7 @@ require 'flipper/adapters/active_record' require 'flipper/adapters/active_support_cache_store' -class Feature +module Feature # Classes to override flipper table names class FlipperFeature < Flipper::Adapters::ActiveRecord::Feature include DatabaseReflection @@ -104,7 +104,14 @@ class Feature def enable(key, thing = true) log(key: key, action: __method__, thing: thing) - with_feature(key) { _1.enable(thing) } + return_value = with_feature(key) { _1.enable(thing) } + + # rubocop:disable Gitlab/RailsLogger + Rails.logger.warn('WARNING: Understand the stability and security risks of enabling in-development features with feature flags.') + Rails.logger.warn('See https://docs.gitlab.com/ee/administration/feature_flags.html#risks-when-enabling-features-still-in-development for more information.') + # rubocop:enable Gitlab/RailsLogger + + return_value end def disable(key, thing = false) |