summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-07-24 12:45:28 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-24 12:45:28 +0000
commitadc327d3fa72b9f5b9c42c629c99f0a89ca15192 (patch)
treec6ac7f3caf6613ba2dc45e86e7d847aaae5c1331
parenteca751a8338ea6bf71dccd4737578568c7cbce09 (diff)
parentad739537728b773851da3f8ffe6303fa1d9d6c7d (diff)
downloadgitlab-ce-adc327d3fa72b9f5b9c42c629c99f0a89ca15192.tar.gz
Merge branch 'zj-repo-cleanup-mandatory' into 'master'
Make repository cleanup mandatory Closes #49550 See merge request gitlab-org/gitlab-ce!20808
-rw-r--r--lib/gitlab/git/repository.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 7bd5927d15e..0356e8efc5c 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -353,8 +353,6 @@ module Gitlab
# offset: 5,
# after: Time.new(2016, 4, 21, 14, 32, 10)
# )
- #
- # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/446
def log(options)
default_options = {
limit: 10,
@@ -1029,8 +1027,8 @@ module Gitlab
end
def clean_stale_repository_files
- gitaly_migrate(:repository_cleanup, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
- gitaly_repository_client.cleanup if is_enabled && exists?
+ wrapped_gitaly_errors do
+ gitaly_repository_client.cleanup if exists?
end
rescue Gitlab::Git::CommandError => e # Don't fail if we can't cleanup
Rails.logger.error("Unable to clean repository on storage #{storage} with relative path #{relative_path}: #{e.message}")