More gitaly disk access blocks
This commit is contained in:
parent
329b00672d
commit
e9e9da822a
6 changed files with 9 additions and 1 deletions
|
@ -407,6 +407,7 @@ module ProjectsHelper
|
|||
@ref || @repository.try(:root_ref)
|
||||
end
|
||||
|
||||
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1235
|
||||
def sanitize_repo_path(project, message)
|
||||
return '' unless message.present?
|
||||
|
||||
|
|
|
@ -154,7 +154,10 @@ class Repository
|
|||
|
||||
# Returns a list of commits that are not present in any reference
|
||||
def new_commits(newrev)
|
||||
refs = ::Gitlab::Git::RevList.new(raw, newrev: newrev).new_refs
|
||||
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1233
|
||||
refs = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
|
||||
::Gitlab::Git::RevList.new(raw, newrev: newrev).new_refs
|
||||
end
|
||||
|
||||
refs.map { |sha| commit(sha.strip) }
|
||||
end
|
||||
|
|
|
@ -394,6 +394,7 @@ repositories_storages = Settings.repositories.storages.values
|
|||
repository_downloads_path = Settings.gitlab['repository_downloads_path'].to_s.gsub(%r{/$}, '')
|
||||
repository_downloads_full_path = File.expand_path(repository_downloads_path, Settings.gitlab['user_home'])
|
||||
|
||||
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1237
|
||||
Gitlab::GitalyClient::StorageSettings.allow_disk_access do
|
||||
if repository_downloads_path.blank? || repositories_storages.any? { |rs| [repository_downloads_path, repository_downloads_full_path].include?(rs.legacy_disk_path.gsub(%r{/$}, '')) }
|
||||
Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive')
|
||||
|
|
|
@ -37,6 +37,7 @@ def validate_storages_config
|
|||
end
|
||||
end
|
||||
|
||||
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1237
|
||||
def validate_storages_paths
|
||||
Gitlab::GitalyClient::StorageSettings.allow_disk_access do
|
||||
Gitlab.config.repositories.storages.each do |name, repository_storage|
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module Gitlab
|
||||
module HealthChecks
|
||||
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1218
|
||||
class FsShardsCheck
|
||||
extend BaseAbstractCheck
|
||||
RANDOM_STRING = SecureRandom.hex(1000).freeze
|
||||
|
|
|
@ -24,6 +24,7 @@ module Gitlab
|
|||
address = val['gitaly_address']
|
||||
end
|
||||
|
||||
# https://gitlab.com/gitlab-org/gitaly/issues/1238
|
||||
Gitlab::GitalyClient::StorageSettings.allow_disk_access do
|
||||
storages << { name: key, path: val.legacy_disk_path }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue