diff options
Diffstat (limited to 'app/models/concerns/ci/partitionable.rb')
-rw-r--r-- | app/models/concerns/ci/partitionable.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/app/models/concerns/ci/partitionable.rb b/app/models/concerns/ci/partitionable.rb index 447603c1635..03cce1edf74 100644 --- a/app/models/concerns/ci/partitionable.rb +++ b/app/models/concerns/ci/partitionable.rb @@ -19,42 +19,6 @@ module Ci extend ActiveSupport::Concern include ::Gitlab::Utils::StrongMemoize - module Testing - InclusionError = Class.new(StandardError) - - PARTITIONABLE_MODELS = %w[ - CommitStatus - Ci::BuildMetadata - Ci::BuildNeed - Ci::BuildReportResult - Ci::BuildRunnerSession - Ci::BuildTraceChunk - Ci::BuildTraceMetadata - Ci::BuildPendingState - Ci::JobAnnotation - Ci::JobArtifact - Ci::JobVariable - Ci::Pipeline - Ci::PendingBuild - Ci::RunningBuild - Ci::RunnerManagerBuild - Ci::PipelineVariable - Ci::Sources::Pipeline - Ci::Stage - Ci::UnitTestFailure - ].freeze - - def self.check_inclusion(klass) - return if PARTITIONABLE_MODELS.include?(klass.name) - - raise Partitionable::Testing::InclusionError, - "#{klass} must be included in PARTITIONABLE_MODELS" - - rescue InclusionError => e - Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e) - end - end - included do Partitionable::Testing.check_inclusion(self) |