Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2019-01-04 00:03:35 +0300
committerValery Sizov <valery@gitlab.com>2019-01-04 21:49:01 +0300
commit6670f838b5bd207bab35c0350e17ecb0a4dace96 (patch)
tree8b89f09bd9d2cc6eb889de3efe202575714496b7 /lib/gitlab/shell.rb
parent3a60173738c277b7ad7da31ebb577d1aaf694485 (diff)
Track Sentry error when namespace cannot be moved
Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8926
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r--lib/gitlab/shell.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index c6a6fb9b5ce..bdf21cf3134 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -289,10 +289,12 @@ module Gitlab
#
def mv_namespace(storage, old_name, new_name)
Gitlab::GitalyClient::NamespaceService.new(storage).rename(old_name, new_name)
- rescue GRPC::InvalidArgument
+ rescue GRPC::InvalidArgument => e
+ Gitlab::Sentry.track_acceptable_exception(e, extra: { old_name: old_name, new_name: new_name, storage: storage })
+
false
end
- alias_method :mv_directory, :mv_namespace
+ alias_method :mv_directory, :mv_namespace # Note: ShellWorker uses this alias
def url_to_repo(path)
Gitlab.config.gitlab_shell.ssh_path_prefix + "#{path}.git"