Add a fast_timeout for the ServerService.ServerInfo
endpoint
This commit is contained in:
parent
67708aa578
commit
7ee5b1f6fb
3 changed files with 7 additions and 2 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Use appropriate timeout on Gitaly server info checks, avoid error on timeout
|
||||
merge_request: 20552
|
||||
author:
|
||||
type: fixed
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue