Commit graph

18 commits

Author SHA1 Message Date
Valery Sizov
15d011d64d Geo: sync disabled wikis. Stage 2
We started syncing all the wiki regardless of the fact it's disabled or
not. We couldn't do that in one stage because of needing of smoth update
and deprecating things. This is the second stage that finally removes
unused columns in the geo_node_status table.
2018-09-25 17:49:39 +03:00
Gabriel Mazetto
2e719bda0a don't trigger project deletion hooks twice when removing a group 2018-08-26 10:58:43 +02:00
Valery Sizov
5fbb6ddf23 Fix: Project deletion may not log audit events during group deletion 2018-08-16 13:34:22 +03:00
blackst0ne
ddd2a25679 Replace 'Sidekiq::Testing.inline!' with 'perform_enqueued_jobs'
`perform_enqueued_jobs` is a Sidekiq method.
Using this method violates the Dependency inversion principle[0].

This commit replaces `perform_enqueued_jobs` with ActiveJob's abstract
method `perform_enqueued_jobs` in specs.

[0]: https://en.wikipedia.org/wiki/Dependency_inversion_principle
2018-07-23 15:34:54 +11:00
Zeger-Jan van de Weg
ec4423665c
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.

Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
2018-04-25 13:36:22 +02:00
Nick Thomas
6b0c6e69e1
Use hashed storage in the specs 2018-02-07 13:40:46 +00:00
Gabriel Mazetto
fb9e059a41 Make sure repository's removal work for legacy and hashed storages 2017-08-22 06:33:20 +02:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Douwe Maan
850a22547c Merge branch 'zj-delete-mm-team' into 'master'
Remove Mattermost team with GitLab group

Closes #30023

See merge request !11362
2017-07-28 09:58:20 +00:00
Z.J. van de Weg
d7062dd042
Remove Mattermost team with GitLab group
When destroying a group, now an API call is made to the Mattermost
server to request the deletion of the project. Actual team deletion on
the Mattermost side happens async, so the runtime shouldn't increase by
more than a second.
2017-07-28 09:09:55 +02:00
Rémy Coutable
cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Stan Hu
fa93156528 Defer project destroys within a namespace in Groups::DestroyService#async_execute
Group#destroy would actually hard-delete all associated projects even
though the acts_as_paranoia gem is used, preventing Projects::DestroyService
from doing any work.

We first noticed this while trying to log all projects deletion to the Geo
log.
2017-06-29 09:23:31 -07:00
James Lopez
d4861ec72d add spec and changelog 2017-04-19 10:15:52 +02:00
Robert Speicher
ca9a79f620 Use :empty_project where possible in service specs 2017-03-27 20:44:09 -04:00
Dmitriy Zaporozhets
334591dd76
Include nested group into destroy_service_spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-27 14:28:02 +02:00
Stan Hu
6606a45030 Fix a number of race conditions that can occur during namespace deletion
There are two problems in the current implementation:

1. If a project is marked for deletion via the `pending_delete` flag
and then the namespace was quickly deleted, it's possible that the
namespace skips over that project and leaves that project in
an orphaned state.

2. Before namespace deletion, the namespace attempts to clean up
all the relevant storage paths. However, if all projects have been
removed synchronously, then the namespace will not be able to clean anything.
To prevent this, we should load the paths to be deleted before
actually destroying projects.

The specs were missing this second case due to a permission issue
that caused project removal never to happen.
2017-02-15 23:56:40 -08:00
dixpac
0dacf3c169 Fix inconsistent naming for services that delete things
* Changed name of delete_user_service and worker to destroy
* Move and change delete_group_service to Groups::DestroyService
* Rename Notes::DeleteService to Notes::DestroyService
2017-02-08 09:16:43 +01:00
Renamed from spec/services/destroy_group_service_spec.rb (Browse further)