Commit b54d43bc authored by Doug Stull's avatar Doug Stull

Merge branch 'jejacks0n/maintenance/allow-experiments-without-namespace' into 'master'

Allow experiment classes to not be namespaced

See merge request gitlab-org/gitlab!79890
parents ecc380bd 4fdd1d73
...@@ -666,6 +666,7 @@ Gitlab/NamespacedClass: ...@@ -666,6 +666,7 @@ Gitlab/NamespacedClass:
- 'ee/elastic/**/*.rb' - 'ee/elastic/**/*.rb'
- 'scripts/**/*' - 'scripts/**/*'
- 'spec/migrations/**/*.rb' - 'spec/migrations/**/*.rb'
- 'app/experiments/**/*_experiment.rb'
Lint/HashCompareByIdentity: Lint/HashCompareByIdentity:
Enabled: true Enabled: true
......
# frozen_string_literal: true # frozen_string_literal: true
class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/NamespacedClass class ApplicationExperiment < Gitlab::Experiment
def publish(_result = nil) def publish(_result = nil)
super super
......
# frozen_string_literal: true # frozen_string_literal: true
class CombinedRegistrationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class CombinedRegistrationExperiment < ApplicationExperiment
include Rails.application.routes.url_helpers include Rails.application.routes.url_helpers
def key_for(source, _ = nil) def key_for(source, _ = nil)
......
# frozen_string_literal: true # frozen_string_literal: true
class EmptyRepoUploadExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class EmptyRepoUploadExperiment < ApplicationExperiment
include ProjectCommitCount include ProjectCommitCount
TRACKING_START_DATE = DateTime.parse('2021/4/20') TRACKING_START_DATE = DateTime.parse('2021/4/20')
......
# frozen_string_literal: true # frozen_string_literal: true
class ForceCompanyTrialExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class ForceCompanyTrialExperiment < ApplicationExperiment
exclude :setup_for_personal exclude :setup_for_personal
private private
......
# frozen_string_literal: true # frozen_string_literal: true
class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment
exclude :has_environments? exclude :has_environments?
def control_behavior def control_behavior
......
# frozen_string_literal: true # frozen_string_literal: true
class NewProjectSastEnabledExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class NewProjectSastEnabledExperiment < ApplicationExperiment
def publish(_result = nil) def publish(_result = nil)
super super
......
# frozen_string_literal: true # frozen_string_literal: true
class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment
exclude :existing_user exclude :existing_user
EXPERIMENT_START_DATE = Date.new(2022, 1, 31) EXPERIMENT_START_DATE = Date.new(2022, 1, 31)
......
# frozen_string_literal: true # frozen_string_literal: true
class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment
def publish(_result = nil) def publish(_result = nil)
super super
......
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