• Stan Hu's avatar
    Extend gRPC timeouts for Rake tasks · 580fc82e
    Stan Hu authored
    In https://gitlab.com/gitlab-org/gitlab/merge_requests/16926 we added
    gRPC timeouts for calls that did not previously have timeouts to prevent
    Sidekiq queries from getting stuck. In addition, we also made long
    timeouts 55 seconds for non-Sidekiq requests, but this meant Rake tasks
    also fell into this bucket. Rake backup tasks with large repositories
    would fail because the CreateBundle RPC would time out after 55 seconds.
    
    To avoid this trap, we flip the logic of long_timeout: instead of
    checking for Sidekiq (or other background jobs), we only lower the
    timeout to 55 seconds if we're servicing a Web request in Puma or
    Unicorn.
    
    Closes https://gitlab.com/gitlab-org/gitlab/issues/22398
    580fc82e
gitaly_client.rb 15.5 KB