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>2023-07-19 17:16:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-19 17:16:28 +0300
commite4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch)
tree2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /app/experiments
parentffda4e7bcac36987f936b4ba515995a6698698f0 (diff)
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'app/experiments')
-rw-r--r--app/experiments/concerns/project_commit_count.rb21
-rw-r--r--app/experiments/empty_repo_upload_experiment.rb22
-rw-r--r--app/experiments/force_company_trial_experiment.rb11
-rw-r--r--app/experiments/logged_out_marketing_header_experiment.rb9
4 files changed, 0 insertions, 63 deletions
diff --git a/app/experiments/concerns/project_commit_count.rb b/app/experiments/concerns/project_commit_count.rb
deleted file mode 100644
index 3f08538c21f..00000000000
--- a/app/experiments/concerns/project_commit_count.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-module ProjectCommitCount
- include Gitlab::Git::WrapsGitalyErrors
-
- def commit_count_for(project, default_count: 0, max_count: nil, **exception_details)
- raw_repo = project.repository&.raw_repository
- root_ref = raw_repo&.root_ref
-
- return default_count unless root_ref
-
- Gitlab::GitalyClient::CommitService.new(raw_repo).commit_count(root_ref, {
- all: true, # include all branches
- max_count: max_count # limit as an optimization
- })
- rescue StandardError => e
- Gitlab::ErrorTracking.track_exception(e, exception_details)
-
- default_count
- end
-end
diff --git a/app/experiments/empty_repo_upload_experiment.rb b/app/experiments/empty_repo_upload_experiment.rb
deleted file mode 100644
index c8c75f32d69..00000000000
--- a/app/experiments/empty_repo_upload_experiment.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class EmptyRepoUploadExperiment < ApplicationExperiment
- include ProjectCommitCount
-
- TRACKING_START_DATE = DateTime.parse('2021/4/20')
- INITIAL_COMMIT_COUNT = 1
-
- def track_initial_write
- return unless should_track? # early return if we don't need to ask for commit counts
- return unless context.project.created_at > TRACKING_START_DATE # early return for older projects
- return unless commit_count == INITIAL_COMMIT_COUNT
-
- track(:initial_write, project: context.project)
- end
-
- private
-
- def commit_count
- commit_count_for(context.project, max_count: INITIAL_COMMIT_COUNT, experiment: name)
- end
-end
diff --git a/app/experiments/force_company_trial_experiment.rb b/app/experiments/force_company_trial_experiment.rb
deleted file mode 100644
index e7b98bb18ad..00000000000
--- a/app/experiments/force_company_trial_experiment.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ForceCompanyTrialExperiment < ApplicationExperiment
- exclude :setup_for_personal
-
- private
-
- def setup_for_personal
- !context.user.setup_for_company
- end
-end
diff --git a/app/experiments/logged_out_marketing_header_experiment.rb b/app/experiments/logged_out_marketing_header_experiment.rb
deleted file mode 100644
index 3d88d94aec4..00000000000
--- a/app/experiments/logged_out_marketing_header_experiment.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class LoggedOutMarketingHeaderExperiment < ApplicationExperiment
- # These default behaviors are overriden in ApplicationHelper and header
- # template partial
- control {}
- candidate {}
- variant(:trial_focused) {}
-end