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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-09 12:07:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-09 12:07:42 +0300
commit44d4b37b52c678a0b6a3c18c8c87319553ce84a3 (patch)
treed09bcd1aad83fe5a4d596b32356bb260eb54aca2 /app/experiments
parent7b29a4f84e25ab3eb610c1595bad38478784f5ff (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r--app/experiments/application_experiment.rb19
-rw-r--r--app/experiments/require_verification_for_namespace_creation_experiment.rb10
-rw-r--r--app/experiments/security_reports_mr_widget_prompt_experiment.rb6
3 files changed, 0 insertions, 35 deletions
diff --git a/app/experiments/application_experiment.rb b/app/experiments/application_experiment.rb
index 863a2c41d4c..60bf47c2f12 100644
--- a/app/experiments/application_experiment.rb
+++ b/app/experiments/application_experiment.rb
@@ -3,25 +3,6 @@
class ApplicationExperiment < Gitlab::Experiment
control { nil } # provide a default control for anonymous experiments
- # Documented in:
- # https://gitlab.com/gitlab-org/gitlab/-/issues/357904
- # https://gitlab.com/gitlab-org/gitlab/-/issues/345932
- #
- # @deprecated
- def publish_to_database
- ActiveSupport::Deprecation.warn('publish_to_database is deprecated and should not be used for reporting anymore')
-
- return unless should_track?
-
- # if the context contains a namespace, group, project, user, or actor
- value = context.value
- subject = value[:namespace] || value[:group] || value[:project] || value[:user] || value[:actor]
- return unless ExperimentSubject.valid_subject?(subject)
-
- variant_name = :experimental if variant&.name != 'control'
- Experiment.add_subject(name, variant: variant_name || :control, subject: subject)
- end
-
def control_behavior
# define a default nil control behavior so we can omit it when not needed
end
diff --git a/app/experiments/require_verification_for_namespace_creation_experiment.rb b/app/experiments/require_verification_for_namespace_creation_experiment.rb
index cb667c6ae60..914c5c4a29e 100644
--- a/app/experiments/require_verification_for_namespace_creation_experiment.rb
+++ b/app/experiments/require_verification_for_namespace_creation_experiment.rb
@@ -12,18 +12,8 @@ class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment
run
end
- def record_conversion(namespace)
- return unless should_track?
-
- Experiment.by_name(name).record_conversion_event_for_subject(subject, namespace_id: namespace.id)
- end
-
private
- def subject
- context.value[:user]
- end
-
def existing_user
return false unless user_or_actor
diff --git a/app/experiments/security_reports_mr_widget_prompt_experiment.rb b/app/experiments/security_reports_mr_widget_prompt_experiment.rb
index 1bf3e15ba3b..0a5778950fa 100644
--- a/app/experiments/security_reports_mr_widget_prompt_experiment.rb
+++ b/app/experiments/security_reports_mr_widget_prompt_experiment.rb
@@ -3,10 +3,4 @@
class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment
control {}
candidate {}
-
- def publish(_result = nil)
- super
-
- publish_to_database
- end
end