diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-07-03 16:19:15 -0700 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-07-09 17:02:08 -0600 |
commit | 36f39eb3189a4caa5225214570de3bfdcd418df1 (patch) | |
tree | 5667a649c146496c5ca41e936a1c87f2c7ace9ca /db | |
parent | 3cabc5581e4d96180c83fbe3d24362bb2c64f2be (diff) | |
download | gitlab-ce-36f39eb3189a4caa5225214570de3bfdcd418df1.tar.gz |
Remove CommonMetricsImporter patch
Remove CommonMetricsImporter patch and change all references to
CommonMetrics::Importer. Move specs into their appropriate folders. Also
cleans up some common_metric importer namespacing.
Diffstat (limited to 'db')
7 files changed, 6 insertions, 27 deletions
diff --git a/db/fixtures/development/99_common_metrics.rb b/db/fixtures/development/99_common_metrics.rb index 1f39c0ce5a0..0406ce0c8c9 100644 --- a/db/fixtures/development/99_common_metrics.rb +++ b/db/fixtures/development/99_common_metrics.rb @@ -1,5 +1,3 @@ # frozen_string_literal: true -require Rails.root.join('db/importers/common_metrics_importer.rb') - -::Importers::CommonMetricsImporter.new.execute +::Gitlab::Importers::CommonMetrics::Importer.new.execute diff --git a/db/fixtures/production/999_common_metrics.rb b/db/fixtures/production/999_common_metrics.rb index 1f39c0ce5a0..0406ce0c8c9 100644 --- a/db/fixtures/production/999_common_metrics.rb +++ b/db/fixtures/production/999_common_metrics.rb @@ -1,5 +1,3 @@ # frozen_string_literal: true -require Rails.root.join('db/importers/common_metrics_importer.rb') - -::Importers::CommonMetricsImporter.new.execute +::Gitlab::Importers::CommonMetrics::Importer.new.execute diff --git a/db/importers/common_metrics_importer.rb b/db/importers/common_metrics_importer.rb deleted file mode 100644 index a2e3996a123..00000000000 --- a/db/importers/common_metrics_importer.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This functionality has been moved to the lib/gitlab/importers/common_metrics module. -# This is here only to preserve existing ::Importers::CommonMetricsImporter api -module Importers - module CommonMetricsImporter - def self.new(*args) - Gitlab::Importers::CommonMetrics::Importer.new(*args) - end - end -end diff --git a/db/migrate/20180831164910_import_common_metrics.rb b/db/migrate/20180831164910_import_common_metrics.rb index f67d5f40aad..cc50ac71f49 100644 --- a/db/migrate/20180831164910_import_common_metrics.rb +++ b/db/migrate/20180831164910_import_common_metrics.rb @@ -3,12 +3,10 @@ class ImportCommonMetrics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down diff --git a/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb b/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb index 5cd312837df..50d3e406496 100644 --- a/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb +++ b/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb @@ -1,12 +1,10 @@ class ImportCommonMetricsNginxVts < ActiveRecord::Migration[5.0] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down diff --git a/db/migrate/20190326164045_import_common_metrics_knative.rb b/db/migrate/20190326164045_import_common_metrics_knative.rb index 340ec1e1f75..46f074ef780 100644 --- a/db/migrate/20190326164045_import_common_metrics_knative.rb +++ b/db/migrate/20190326164045_import_common_metrics_knative.rb @@ -3,12 +3,10 @@ class ImportCommonMetricsKnative < ActiveRecord::Migration[5.0] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down diff --git a/db/migrate/20190408163745_prometheus_knative05_fix.rb b/db/migrate/20190408163745_prometheus_knative05_fix.rb index c11f6f0e29b..1b8e07a8c08 100644 --- a/db/migrate/20190408163745_prometheus_knative05_fix.rb +++ b/db/migrate/20190408163745_prometheus_knative05_fix.rb @@ -6,12 +6,10 @@ class PrometheusKnative05Fix < ActiveRecord::Migration[5.0] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down |