summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-01-10 13:32:17 +0100
committerToon Claes <toon@gitlab.com>2019-01-10 16:45:14 +0100
commitb87dcc238a8b6f42c75835e3d71abacafec0b2c9 (patch)
tree02afbb2c049935a744b6da0700b8d569d06ce608
parent336070913cee4d88dc62faefc016b6d922d97df8 (diff)
downloadgitlab-ce-b87dcc238a8b6f42c75835e3d71abacafec0b2c9.tar.gz
Remove backfill migration for legacy projects
We've found some problems with the backgroung migration: BackfillLegacyProjectRepositories See https://gitlab.com/gitlab-org/gitlab-ce/issues/56061 The migration was disabled to run on production: https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5906 So to overcome it's not being run anywhere, just remove it. Whenever all problems in BackfillLegacyProjectRepositories are fixed we'll create a new migration (with a different timestamp) to have it run.
-rw-r--r--changelogs/unreleased/tc-remove-20181218192239-migration.yml5
-rw-r--r--db/post_migrate/20181218192239_backfill_project_repositories_for_legacy_storage_projects.rb26
-rw-r--r--spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb2
3 files changed, 6 insertions, 27 deletions
diff --git a/changelogs/unreleased/tc-remove-20181218192239-migration.yml b/changelogs/unreleased/tc-remove-20181218192239-migration.yml
new file mode 100644
index 00000000000..81e06a99c1f
--- /dev/null
+++ b/changelogs/unreleased/tc-remove-20181218192239-migration.yml
@@ -0,0 +1,5 @@
+---
+title: Remove migration to backfill project_repositories for legacy storage projects
+merge_request: 24299
+author:
+type: removed
diff --git a/db/post_migrate/20181218192239_backfill_project_repositories_for_legacy_storage_projects.rb b/db/post_migrate/20181218192239_backfill_project_repositories_for_legacy_storage_projects.rb
deleted file mode 100644
index 42f96750789..00000000000
--- a/db/post_migrate/20181218192239_backfill_project_repositories_for_legacy_storage_projects.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillProjectRepositoriesForLegacyStorageProjects < ActiveRecord::Migration[5.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- BATCH_SIZE = 1_000
- DELAY_INTERVAL = 5.minutes
- MIGRATION = 'BackfillLegacyProjectRepositories'
-
- disable_ddl_transaction!
-
- class Project < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'projects'
- end
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(Project, MIGRATION, DELAY_INTERVAL)
- end
-
- def down
- # no-op: since there could have been existing rows before the migration do not remove anything
- end
-end
diff --git a/spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb b/spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb
index ae4b53d62e6..947c99b860f 100644
--- a/spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb
+++ b/spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb
@@ -2,6 +2,6 @@
require 'spec_helper'
-describe Gitlab::BackgroundMigration::BackfillLegacyProjectRepositories, :migration, schema: 20181218192239 do
+describe Gitlab::BackgroundMigration::BackfillLegacyProjectRepositories, :migration, schema: 20181212171634 do
it_behaves_like 'backfill migration for project repositories', :legacy
end