diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-09 03:15:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-09 03:15:57 +0300 |
commit | 3d440ae03ec46ad4fe93c06d7ccff9290e5872b9 (patch) | |
tree | bf205c6719eb53e3006da58829d8d417fffbc96f /app/experiments | |
parent | 9fe6c95b643c5a2704a8b2a809bd0bd80c5a3307 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r-- | app/experiments/application_experiment.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/app/experiments/application_experiment.rb b/app/experiments/application_experiment.rb index 2dabf33405d..ec6762096ad 100644 --- a/app/experiments/application_experiment.rb +++ b/app/experiments/application_experiment.rb @@ -1,14 +1,6 @@ # frozen_string_literal: true class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/NamespacedClass - def enabled? - return false if Feature::Definition.get(feature_flag_name).nil? # there has to be a feature flag yaml file - return false unless Gitlab.dev_env_or_com? # we have to be in an environment that allows experiments - - # the feature flag has to be rolled out - Feature.get(feature_flag_name).state != :off # rubocop:disable Gitlab/AvoidFeatureGet - end - def publish(_result = nil) super @@ -72,12 +64,4 @@ class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/Namesp actor = context.try(:actor) actor.respond_to?(:id) ? actor : context.try(:user) end - - def feature_flag_name - name.tr('/', '_') - end - - def experiment_group? - Feature.enabled?(feature_flag_name, self, type: :experiment, default_enabled: :yaml) - end end |