diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/experiments | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-41fe97390ceddf945f3d967b8fdb3de4c66b7dea.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/experiments')
6 files changed, 19 insertions, 51 deletions
diff --git a/app/experiments/application_experiment.rb b/app/experiments/application_experiment.rb index f6af7ca15bb..f74e7fe3b1d 100644 --- a/app/experiments/application_experiment.rb +++ b/app/experiments/application_experiment.rb @@ -1,19 +1,7 @@ # frozen_string_literal: true class ApplicationExperiment < Gitlab::Experiment - def publish(_result = nil) - super - - publish_to_client - end - - def publish_to_client - return unless should_track? - - Gon.push({ experiment: { name => signature } }, true) - rescue NoMethodError - # means we're not in the request cycle, and can't add to Gon. Log a warning maybe? - end + control { nil } # provide a default control for anonymous experiments def publish_to_database ActiveSupport::Deprecation.warn('publish_to_database is deprecated and should not be used for reporting anymore') diff --git a/app/experiments/combined_registration_experiment.rb b/app/experiments/combined_registration_experiment.rb index 576e10815aa..38295cec0d3 100644 --- a/app/experiments/combined_registration_experiment.rb +++ b/app/experiments/combined_registration_experiment.rb @@ -3,6 +3,9 @@ class CombinedRegistrationExperiment < ApplicationExperiment include Rails.application.routes.url_helpers + control { new_users_sign_up_group_path } + candidate { new_users_sign_up_groups_project_path } + def key_for(source, _ = nil) super(source, 'force_company_trial') end @@ -10,12 +13,4 @@ class CombinedRegistrationExperiment < ApplicationExperiment def redirect_path run end - - def control_behavior - new_users_sign_up_group_path - end - - def candidate_behavior - new_users_sign_up_groups_project_path - end end diff --git a/app/experiments/in_product_guidance_environments_webide_experiment.rb b/app/experiments/in_product_guidance_environments_webide_experiment.rb index 6567ec0b3f1..78602874cb7 100644 --- a/app/experiments/in_product_guidance_environments_webide_experiment.rb +++ b/app/experiments/in_product_guidance_environments_webide_experiment.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment - exclude :has_environments? + control { false } - def control_behavior - false - end + exclude :has_environments? private diff --git a/app/experiments/new_project_sast_enabled_experiment.rb b/app/experiments/new_project_sast_enabled_experiment.rb index ee9d0dc1700..4aca4c875b2 100644 --- a/app/experiments/new_project_sast_enabled_experiment.rb +++ b/app/experiments/new_project_sast_enabled_experiment.rb @@ -1,21 +1,15 @@ # frozen_string_literal: true class NewProjectSastEnabledExperiment < ApplicationExperiment - def publish(_result = nil) + control { } + variant(:candidate) { } + variant(:free_indicator) { } + variant(:unchecked_candidate) { } + variant(:unchecked_free_indicator) { } + + def publish(*args) super publish_to_database end - - def candidate_behavior - end - - def free_indicator_behavior - end - - def unchecked_candidate_behavior - end - - def unchecked_free_indicator_behavior - end end diff --git a/app/experiments/require_verification_for_namespace_creation_experiment.rb b/app/experiments/require_verification_for_namespace_creation_experiment.rb index 0c47f5d183c..cb667c6ae60 100644 --- a/app/experiments/require_verification_for_namespace_creation_experiment.rb +++ b/app/experiments/require_verification_for_namespace_creation_experiment.rb @@ -1,18 +1,13 @@ # frozen_string_literal: true class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment + control { false } + candidate { true } + exclude :existing_user EXPERIMENT_START_DATE = Date.new(2022, 1, 31) - def control_behavior - false - end - - def candidate_behavior - true - end - def candidate? run end diff --git a/app/experiments/security_reports_mr_widget_prompt_experiment.rb b/app/experiments/security_reports_mr_widget_prompt_experiment.rb index bcb9d64fcb7..51b81be672d 100644 --- a/app/experiments/security_reports_mr_widget_prompt_experiment.rb +++ b/app/experiments/security_reports_mr_widget_prompt_experiment.rb @@ -1,14 +1,12 @@ # frozen_string_literal: true class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment + control { } + candidate { } + def publish(_result = nil) super publish_to_database end - - # This is a purely client side experiment, and since we don't have a nicer - # way to define variants yet, we define them here. - def candidate_behavior - end end |