Run migration to remove pending delete projects with non-existing namespace
For merge request gitlab-org/gitlab-ce!13598 I would like to run the post-deploy migration on staging.
Can someone please run 20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb (using the modified namespaceless_project_destroy_worker.rb) on staging and provide the execution time and log output for it?
Instructions
- Copy https://gitlab.com/gitlab-org/gitlab-ce/raw/ab5b12c80367a116ead12fee7510360b2f1193a0/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb and https://gitlab.com/gitlab-org/gitlab-ce/raw/ab5b12c80367a116ead12fee7510360b2f1193a0/app/workers/namespaceless_project_destroy_worker.rb to a temporary directory on the staging environment (e.g.
/tmp) - Open a rails console
- In the rails console,
requireboth files copied over, likerequire_relative '/tmp/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb'require_relative '/tmp/namespaceless_project_destroy_worker.rb'
- In the rails console, run
Benchmark.measure { CleanupNonexistingNamespacePendingDeleteProjects.new.up }and copy the output here - In the rails console, run
CleanupNonexistingNamespacePendingDeleteProjects.new.downto undo the changes
Edited by Toon Claes