Commit Graph

55 Commits

Author SHA1 Message Date
GitLab Bot 6323146895 Add latest changes from gitlab-org/gitlab@master 2023-12-21 15:12:00 +00:00
GitLab Bot 289ce60cdc Add latest changes from gitlab-org/gitlab@master 2023-10-11 09:11:29 +00:00
GitLab Bot 283c7bb302 Add latest changes from gitlab-org/gitlab@master 2023-02-14 18:12:38 +00:00
GitLab Bot b26eec8cbc Add latest changes from gitlab-org/gitlab@master 2022-12-02 00:07:06 +00:00
GitLab Bot 03d0856547 Add latest changes from gitlab-org/gitlab@master 2022-01-13 06:14:35 +00:00
GitLab Bot 9fee949311 Add latest changes from gitlab-org/gitlab@master 2021-12-10 21:11:20 +00:00
GitLab Bot 844eb8879a Add latest changes from gitlab-org/gitlab@master 2021-11-24 18:14:31 +00:00
GitLab Bot 0ebbf19f2d Add latest changes from gitlab-org/gitlab@master 2021-06-08 15:10:00 +00:00
GitLab Bot f719944dee Add latest changes from gitlab-org/gitlab@master 2021-05-27 15:10:39 +00:00
GitLab Bot 6bc190088e Add latest changes from gitlab-org/gitlab@master 2021-01-25 12:09:07 +00:00
GitLab Bot 24553ccf90 Add latest changes from gitlab-org/gitlab@master 2020-09-10 03:08:56 +00:00
GitLab Bot b296ffa543 Add latest changes from gitlab-org/gitlab@master 2020-09-09 21:08:33 +00:00
GitLab Bot 8f9beefac3 Add latest changes from gitlab-org/gitlab@master 2020-03-23 12:09:47 +00:00
GitLab Bot dc889678d1 Add latest changes from gitlab-org/gitlab@master 2020-03-12 15:09:39 +00:00
GitLab Bot 20758bc3b3 Add latest changes from gitlab-org/gitlab@master 2019-11-27 18:06:30 +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
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00: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
Ray Paik 976fee745e Update cleanup.rake to fix a typo in the error message 2019-03-07 23:37:16 +00:00
Zeger-Jan van de Weg fff7754186
Rename the Repository table to PoolRepository
To separate the different kinds of repositories we have at GitLab this
table will be renamed to pool_repositories. A project can, for now at
least, be member of none, or one of these. The table will get additional
columns in a later merge request where more logic is implemented for the
model.

Further included is a small refactor of logic around hashing ids for the
disk_path, mainly to ensure a previous implementation is reusable.

The disk_path for the pool_repositories table no longer has a NOT NULL
constraint, but given the hashing of the ID requires the DB to assign
the record an ID, an after_create hook is used to update the value.

A related MR is:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23143, adding
tables for 'normal' repositories and wiki_repositories.
2018-11-27 13:41:46 +01: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
Jarka Kadlecová 6aaeb6dc41 Clean orphaned files in object storage 2018-08-07 12:51:58 +02:00
Michael Kozono 3cbd8b1343 Add local project uploads cleanup task 2018-07-31 11:09:42 -07:00
Zeger-Jan van de Weg 80c61639f3
Remove refs cleanup job
Introduced by f20eadcbbe, meant to remove
refs from Git using the wrong name. That never made it to a non-rc
release and can be safely removed now.
2018-07-19 14:47:11 +02:00
Jacob Vosmaer (GitLab) a0808df0b6 Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
Jacob Vosmaer 008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
Horatiu Eugen Vlad 1ad5df49b1 Moved o_auth/saml/ldap modules under gitlab/auth 2018-02-28 16:53:02 +01:00
Lin Jen-Shin 8e87ecbf30 Eliminate the warnings from task helpers 2018-01-26 19:42:48 +08:00
Jacob Vosmaer 6d6f7536bd Look for rugged with static analysis 2018-01-25 14:05:11 +01:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
digitalMoksha 30a9fc33f3 static-analysis fix 2017-11-25 15:20:24 +01:00
digitalMoksha 3bb103f282 refactored the hashed repository name 2017-11-25 14:23:41 +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
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Lin Jen-Shin c5553ce772 Use `git update-ref --stdin -z` to delete refs 2017-08-30 22:01:23 +08:00
Alejandro Rodríguez 0b9d56f960 Update storage settings to allow extra values per shard
This will be necessary when adding gitaly settings. This version
doesn't make any functional changes, but allows us to include this
breaking change in 9.0 and add the needed extra settings in the future
with backwards compatibility
2017-03-03 12:13:30 -03:00
Douwe Maan 87c9df29ce Don’t exclude some file in lib from rubocop 2017-02-23 09:32:42 -06:00
Adam Pahlevi a0586dbc16 replace `find_with_namespace` with `find_by_full_path`
add complete changelog for !8949
2017-02-03 07:14:04 +07:00
Z.J. van de Weg f20eadcbbe Fix faulty deployment refs
In the 8.13 RC cycle, so before the release, there was a time in which
references in git where stored by id instead of iid. This could be fixed
by time, if the iid catches up with the id, it overwrites it. But in the
mean time we have wrong refs in the folder.

This commit fixes that. For all projects we have deployments we'll find
the ones where the ref has a higher number than the iid is now and calls
`#create_ref` on the corresponding deployment.
2016-11-18 15:47:20 +01:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Connor Shea 903946c78a
Replace colorize gem with rainbow.
Colorize is a gem licensed under the GPLv2, so we can’t use it in GitLab without relicensing GitLab under the terms of the GPL. Rainbow is licensed under the MIT license and does the exact same thing as Colorize, so Rainbow was added in place of Colorize.

The syntax is slightly different for Rainbow vs. Colorize, and was updated in accordance.

The gem is still a dependency of Spinach, so it’s included in the development/test environments, but won’t be packaged with the actual product, and therefore doesn’t require we relicense the product.

An attempt at relicensing Colorize was made, but didn’t succeed as the library owner never responded.

Rainbow library: https://github.com/sickill/rainbow
Relevant issue regarding licensing in GitLab's gems: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3775
2016-06-03 10:37:09 -06:00
Jacob Vosmaer ed38627ec5 Guard against trailing slashes in repos_path 2015-09-15 17:07:51 +02:00
Jacob Vosmaer 52d7813f2e Improve repo cleanup task
Clean up more than just global (legacy) repos. Also, instead of
deleting, just rename.
2015-09-15 16:10:29 +02:00
Dmitriy Zaporozhets b8f12d1917 Replace GITLAB with GitLab in rake task descriptions 2015-06-23 16:52:40 +02:00
zenati b0de6e9ae2 An `in_namespace` scope is already present 2015-06-09 13:42:01 +02:00
Daniel Steinborn 880fb9eac0 fixed rake task to block removed ldap users 2015-02-16 10:00:25 +01:00
Marvin Frick 1f902c2464 fixes the `block_removed_ldap_users` rake task
In e23a26a (and later 1bc9936) the API for Gitlab::LDAP::Adapter was
changed. I assume this rake task was an oversight in the refactoring of
the changed class.

While being on it, I noticed that already blocked users cannot be
blocked again.
2014-11-12 12:06:24 +01:00
Marvin Frick ec61dfdc8c adds rake task to clean up deleted LDAP users 2014-06-26 16:09:15 +02:00