gitlab-org--gitlab-foss/app/workers
Stan Hu cb8a425ba4 Fix bug where destroying a namespace would not always destroy projects
There is a race condition in DestroyGroupService now that projects are deleted asynchronously:

1. User attempts to delete group
2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project
3. DestroyGroupService destroys the Group, leaving all its projects without a namespace
4. Projects::DestroyService runs later but the can?(current_user,
   :remove_project) is `false` because the user no longer has permission to
   destroy projects with no namespace.
5. This leaves the project in pending_delete state with no namespace/group.

Projects without a namespace or group also adds another problem: it's not possible to destroy the container
registry tags, since container_registry_path_with_namespace is the wrong value.

The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService.

Closes #17893
2016-08-11 15:36:35 -07:00
..
repository_check Do not check repos without push events 2016-06-15 19:11:25 +02:00
admin_email_worker.rb
build_email_worker.rb
delete_user_worker.rb
email_receiver_worker.rb An instruction for what to do 2016-06-15 15:49:01 +08:00
emails_on_push_worker.rb switch from diff_file_collection to diffs 2016-08-03 07:00:20 +02:00
expire_build_artifacts_worker.rb Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
git_garbage_collect_worker.rb Refresh branch cache after git gc 2016-07-13 06:49:58 -07:00
gitlab_shell_worker.rb
group_destroy_worker.rb Fix bug where destroying a namespace would not always destroy projects 2016-08-11 15:36:35 -07:00
import_export_project_cleanup_worker.rb using shared path for project import uploads and refactored gitlab remove export worker 2016-08-04 12:51:55 +02:00
irker_worker.rb Use commit deltas when counting files in IrkerWorker 2016-08-03 19:26:10 +02:00
merge_worker.rb
new_note_worker.rb
post_receive.rb Log base64-decoded PostReceive arguments 2016-08-05 15:00:12 +02:00
project_cache_worker.rb
project_destroy_worker.rb Fix skip_repo parameter being ignored when destroying a namespace 2016-08-03 17:07:38 -07:00
project_export_worker.rb limit project expor retry to only 3 2016-07-18 09:23:41 +02:00
project_service_worker.rb
project_web_hook_worker.rb
repository_archive_cache_worker.rb Add service to clean up repository archive cache 2016-07-21 10:31:49 -03:00
repository_fork_worker.rb Fix a bug where forking a project from a repository storage to another would fail 2016-07-26 17:22:13 -04:00
repository_import_worker.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
requests_profiles_worker.rb Profile requests when a header is passed 2016-07-26 20:06:09 +02:00
stuck_ci_builds_worker.rb Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
system_hook_worker.rb