Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb11
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)