diff options
author | Rémy Coutable <remy@rymai.me> | 2018-07-12 10:09:03 +0000 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-07-13 13:38:19 +0200 |
commit | 993f14ee26fa523118f50416f275ad89e1877e7c (patch) | |
tree | cfbe9c5dd550e8fb78159875c9fa5616653b415c | |
parent | 9b34366696731be667c2d019316b6af9f6502c78 (diff) | |
download | gitlab-ce-993f14ee26fa523118f50416f275ad89e1877e7c.tar.gz |
Merge branch 'gitaly-serverservice-info-timeout' into 'master'11-1-stable-prepare-rc11
Add a fast_timeout for the `ServerService.ServerInfo` endpoint
Closes #49116
See merge request gitlab-org/gitlab-ce!20552
-rw-r--r-- | changelogs/unreleased/gitaly-serverservice-info-timeout.yml | 5 | ||||
-rw-r--r-- | lib/gitaly/server.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/server_service.rb | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/changelogs/unreleased/gitaly-serverservice-info-timeout.yml b/changelogs/unreleased/gitaly-serverservice-info-timeout.yml new file mode 100644 index 00000000000..7f2fe8b9c93 --- /dev/null +++ b/changelogs/unreleased/gitaly-serverservice-info-timeout.yml @@ -0,0 +1,5 @@ +--- +title: Use appropriate timeout on Gitaly server info checks, avoid error on timeout +merge_request: 20552 +author: +type: fixed diff --git a/lib/gitaly/server.rb b/lib/gitaly/server.rb index 2760211fee8..f95e423ef22 100644 --- a/lib/gitaly/server.rb +++ b/lib/gitaly/server.rb @@ -50,7 +50,7 @@ module Gitaly @info ||= begin Gitlab::GitalyClient::ServerService.new(@storage).info - rescue GRPC::Unavailable, GRPC::GRPC::DeadlineExceeded + rescue GRPC::Unavailable, GRPC::DeadlineExceeded # This will show the server as being out of date Gitaly::ServerInfoResponse.new(git_version: '', server_version: '', storage_statuses: []) end diff --git a/lib/gitlab/gitaly_client/server_service.rb b/lib/gitlab/gitaly_client/server_service.rb index 2e1076d1f66..ad898278353 100644 --- a/lib/gitlab/gitaly_client/server_service.rb +++ b/lib/gitlab/gitaly_client/server_service.rb @@ -9,7 +9,7 @@ module Gitlab end def info - GitalyClient.call(@storage, :server_service, :server_info, Gitaly::ServerInfoRequest.new) + GitalyClient.call(@storage, :server_service, :server_info, Gitaly::ServerInfoRequest.new, timeout: GitalyClient.fast_timeout) end end end |