Skip to content
Snippets Groups Projects
Unverified Commit 36d75be3 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Move TagNames to mandatory through Gitaly

parent 89095530
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -150,12 +150,8 @@ module Gitlab
# Returns an Array of branch names
# sorted by name ASC
def branch_names
gitaly_migrate(:branch_names, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled
gitaly_ref_client.branch_names
else
branches.map(&:name)
end
wrapped_gitaly_errors do
gitaly_ref_client.branch_names
end
end
 
Loading
Loading
@@ -268,7 +264,9 @@ module Gitlab
 
# Returns an Array of tag names
def tag_names
gitaly_ref_client.tag_names
wrapped_gitaly_errors do
gitaly_ref_client.tag_names
end
end
 
# Returns an Array of Tags
Loading
Loading
@@ -1420,6 +1418,16 @@ module Gitlab
raise CommandError.new(e)
end
 
def wrapped_gitaly_errors(&block)
yield block
rescue GRPC::NotFound => e
raise NoRepository.new(e)
rescue GRPC::InvalidArgument => e
raise ArgumentError.new(e)
rescue GRPC::BadStatus => e
raise CommandError.new(e)
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?
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment