Commit graph

14 commits

Author SHA1 Message Date
GitLab Bot
4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot
8f9beefac3 Add latest changes from gitlab-org/gitlab@master 2020-03-23 12:09:47 +00:00
GitLab Bot
a89cb5cbdd Add latest changes from gitlab-org/gitlab@master 2020-02-06 21:08:48 +00:00
GitLab Bot
3d13802bc2 Add latest changes from gitlab-org/gitlab@master 2019-10-15 09:06:09 +00:00
GitLab Bot
185f428fa5 Add latest changes from gitlab-org/gitlab@master 2019-10-07 12:06:18 +00:00
Imre Farkas
313f145b55
Rake task to cleanup expired ActiveSession lookup keys
In some cases ActiveSession.cleanup was not called after authentication,
so for some user ActiveSession lookup keys grew without ever cleaning
up. This Rake task manually iterates over the lookup keys and removes
ones without existing ActiveSession.
2019-07-22 17:15:57 +02:00
Toon Claes
dabd91b2c8 Add rake task to clean orphan artifact files
This adds the rake task rake
gitlab:cleanup:orphan_job_artifact_files. This rake task cleans all
orphan job artifact files it can find on disk.

 It performs a search on the complete folder of all artifacts on
disk. Then it filters out all the job artifact ID for which it could
not find a record with matching ID in the database. For these, the
file is deleted from disk.
2019-06-28 10:02:18 +02:00
Zeger-Jan van de Weg
3aedccb17a
Port cleanup tasks to use Gitaly
Rake tasks cleaning up the Git storage were still using direct disk
access, which won't work if these aren't attached. To mitigate a
migration issue was created.

To port gitlab:cleanup:dirs, and gitlab:cleanup:repos, a new RPC was
required, ListDirectories. This was implemented in Gitaly, through
https://gitlab.com/gitlab-org/gitaly/merge_requests/868.

To be able to use the new RPC the Gitaly server was bumped to v0.120.

This is an RPC that will not use feature gates, as this doesn't scale on
.com so there is no way to test it at scale. Futhermore, we _know_ it
doesn't scale, but this might be a useful task for smaller instances.

Lastly, the tests are slightly updated to also work when the disk isn't
attached. Eventhough this is not planned, it was very little effort and
thus I applied the boy scout rule.

Closes https://gitlab.com/gitlab-org/gitaly/issues/954
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40529
2018-09-07 13:58:31 +02:00
Michael Kozono
a4351ac077 Add object storage related tests for gitlab:cleanup:project_uploads task 2018-08-03 04:36:43 +00:00
Michael Kozono
3cbd8b1343 Add local project uploads cleanup task 2018-07-31 11:09:42 -07:00
Jacob Vosmaer
008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
digitalMoksha
02dd3b4ed1 static analysis fix 2017-11-24 21:10:00 +01:00
digitalMoksha
17069a9547 ignore hashed repositories when doing rake gitlab:cleanup:dirs 2017-11-24 19:29:25 +01:00
Brett Walker
5e861a0525 ignore hashed repos (for now) when using rake gitlab:cleanup:repos 2017-11-21 20:26:53 +00:00