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

  1. 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)
  2. Open a rails console
  3. In the rails console, require both files copied over, like
    1. require_relative '/tmp/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb'
    2. require_relative '/tmp/namespaceless_project_destroy_worker.rb'
  4. In the rails console, run Benchmark.measure { CleanupNonexistingNamespacePendingDeleteProjects.new.up } and copy the output here
  5. In the rails console, run CleanupNonexistingNamespacePendingDeleteProjects.new.down to undo the changes
Edited Aug 22, 2017 by Toon Claes
Assignee Loading
Time tracking Loading