Commit 1eb4aaa5 authored by Kamil Trzciński's avatar Kamil Trzciński

Revert "Merge branch...

Revert "Merge branch '290724-experiments-using-flipper-will-require-feature-flag-yml-files' into 'master'"

This reverts merge request !49244
parent 61de4952
---
name: ci_notification_dot_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27626
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/101
milestone: '12.10'
type: experiment
group: group::expansion
default_enabled: false
---
name: contact_sales_btn_in_app_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38508
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/238207
milestone: '13.3'
type: experiment
group: group::conversion
default_enabled: true
---
name: customize_homepage_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39348
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/187
milestone: '13.4'
type: experiment
group: group::expansion
default_enabled: false
---
name: default_to_issues_board_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43939
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/268298
milestone: '13.5'
type: experiment
group: group::conversion
default_enabled: true
---
name: group_only_trials_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40564
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/258629
milestone: '13.5'
type: experiment
group: group::conversion
default_enabled: false
---
name: invite_members_empty_group_version_a_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45689
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/280
milestone: '13.6'
type: experiment
group: group::expansion
default_enabled: false
---
name: invite_members_empty_project_version_a_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49588
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/262014
milestone: '13.7'
type: experiment
group: group::expansion
default_enabled: false
---
name: invite_members_version_a_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45689/
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/219239
milestone: '13.6'
type: experiment
group: group::expansion
default_enabled: false
---
name: invite_members_version_b_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43900
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/214
milestone: '13.5'
type: experiment
group: group::expansion
default_enabled: false
---
name: jobs_empty_state_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48686
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/281054
milestone: '13.7'
type: experiment
group: group::activation
default_enabled: false
---
name: onboarding_issues_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31656/
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/224515
milestone: '13.0'
type: experiment
group: group::conversion
default_enabled: true
---
name: remove_known_trial_form_fields_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45634/
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/281
milestone: '13.7'
type: experiment
group: group::conversion
default_enabled: false
---
name: trial_registration_with_social_signin_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45633
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/262853
milestone: '13.7'
type: experiment
group: group::conversion
default_enabled: false
---
name: trimmed_skip_trial_copy_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48110
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/284956
milestone: '13.7'
type: experiment
group: group::conversion
default_enabled: false
---
name: upgrade_link_in_user_menu_a_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29428
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/126
milestone: '13.0'
type: experiment
group: group::expansion
default_enabled: false
...@@ -57,8 +57,6 @@ class Feature ...@@ -57,8 +57,6 @@ class Feature
default_enabled: false, default_enabled: false,
example: <<-EOS example: <<-EOS
experiment(:my_experiment, project: project, actor: current_user) { ...variant code... } experiment(:my_experiment, project: project, actor: current_user) { ...variant code... }
# or
Gitlab::Experimentation.in_experiment_group?(:my_experiment, subject: current_user)
EOS EOS
} }
}.freeze }.freeze
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
module Gitlab module Gitlab
module Experimentation module Experimentation
class Experiment class Experiment
FEATURE_FLAG_SUFFIX = "_experiment_percentage"
attr_reader :key, :tracking_category, :use_backwards_compatible_subject_index attr_reader :key, :tracking_category, :use_backwards_compatible_subject_index
def initialize(key, **params) def initialize(key, **params)
...@@ -12,7 +10,7 @@ module Gitlab ...@@ -12,7 +10,7 @@ module Gitlab
@tracking_category = params[:tracking_category] @tracking_category = params[:tracking_category]
@use_backwards_compatible_subject_index = params[:use_backwards_compatible_subject_index] @use_backwards_compatible_subject_index = params[:use_backwards_compatible_subject_index]
@experiment_percentage = Feature.get(:"#{key}#{FEATURE_FLAG_SUFFIX}").percentage_of_time_value # rubocop:disable Gitlab/AvoidFeatureGet @experiment_percentage = Feature.get(:"#{key}_experiment_percentage").percentage_of_time_value # rubocop:disable Gitlab/AvoidFeatureGet
end end
def active? def active?
......
# frozen_string_literal: true # frozen_string_literal: true
module StubExperiments module StubExperiments
SUFFIX = Gitlab::Experimentation::Experiment::FEATURE_FLAG_SUFFIX
# Stub Experiment with `key: true/false` # Stub Experiment with `key: true/false`
# #
# @param [Hash] experiment where key is feature name and value is boolean whether active or not. # @param [Hash] experiment where key is feature name and value is boolean whether active or not.
...@@ -13,7 +11,6 @@ module StubExperiments ...@@ -13,7 +11,6 @@ module StubExperiments
allow(Gitlab::Experimentation).to receive(:active?).and_call_original allow(Gitlab::Experimentation).to receive(:active?).and_call_original
experiments.each do |experiment_key, enabled| experiments.each do |experiment_key, enabled|
Feature.persist_used!("#{experiment_key}#{SUFFIX}")
allow(Gitlab::Experimentation).to receive(:active?).with(experiment_key) { enabled } allow(Gitlab::Experimentation).to receive(:active?).with(experiment_key) { enabled }
end end
end end
...@@ -28,7 +25,6 @@ module StubExperiments ...@@ -28,7 +25,6 @@ module StubExperiments
allow(Gitlab::Experimentation).to receive(:in_experiment_group?).and_call_original allow(Gitlab::Experimentation).to receive(:in_experiment_group?).and_call_original
experiments.each do |experiment_key, enabled| experiments.each do |experiment_key, enabled|
Feature.persist_used!("#{experiment_key}#{SUFFIX}")
allow(Gitlab::Experimentation).to receive(:in_experiment_group?).with(experiment_key, anything) { enabled } allow(Gitlab::Experimentation).to receive(:in_experiment_group?).with(experiment_key, anything) { enabled }
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment