diff options
Diffstat (limited to 'lib/gitlab/experimentation.rb')
-rw-r--r-- | lib/gitlab/experimentation.rb | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/gitlab/experimentation.rb b/lib/gitlab/experimentation.rb index 2f78e4e5c0a..c74bd8e75ef 100644 --- a/lib/gitlab/experimentation.rb +++ b/lib/gitlab/experimentation.rb @@ -5,12 +5,8 @@ # Utility module for A/B testing experimental features. Define your experiments in the `EXPERIMENTS` constant. # Experiment options: # - tracking_category (optional, used to set the category when tracking an experiment event) -# - use_backwards_compatible_subject_index (optional, set this to true if you need backwards compatibility -- you likely do not need this, see note in the next paragraph.) # - rollout_strategy: default is `:cookie` based rollout. We may also set it to `:user` based rollout # -# Using the backwards-compatible subject index (use_backwards_compatible_subject_index option): -# This option was added when [the calculation of experimentation_subject_index was changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45733/diffs#41af4a6fa5a10c7068559ce21c5188483751d934_157_173). It is not intended to be used by new experiments, it exists merely for the segmentation integrity of in-flight experiments at the time the change was deployed. That is, we want users who were assigned to the "experimental" group or the "control" group before the change to still be in those same groups after the change. See [the original issue](https://gitlab.com/gitlab-org/gitlab/-/issues/270858) and [this related comment](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48110#note_458223745) for more information. -# # The experiment is controlled by a Feature Flag (https://docs.gitlab.com/ee/development/feature_flags/controls.html), # which is named "#{experiment_key}_experiment_percentage" and *must* be set with a percentage and not be used for other purposes. # @@ -48,14 +44,6 @@ module Gitlab show_trial_status_in_sidebar: { tracking_category: 'Growth::Conversion::Experiment::ShowTrialStatusInSidebar', rollout_strategy: :group - }, - learn_gitlab_a: { - tracking_category: 'Growth::Conversion::Experiment::LearnGitLabA', - rollout_strategy: :user - }, - learn_gitlab_b: { - tracking_category: 'Growth::Activation::Experiment::LearnGitLabB', - rollout_strategy: :user } }.freeze @@ -118,11 +106,7 @@ module Gitlab private def index_for_subject(experiment, subject) - index = if experiment.use_backwards_compatible_subject_index - Digest::SHA1.hexdigest(subject_id(subject)).hex - else - Zlib.crc32("#{experiment.key}#{subject_id(subject)}") - end + index = Zlib.crc32("#{experiment.key}#{subject_id(subject)}") index % 100 end |