Commit 7ee5b1f6 authored by Andrew Newdigate's avatar Andrew Newdigate

Add a fast_timeout for the `ServerService.ServerInfo` endpoint

parent 67708aa5
---
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment