Set the default gitaly timeout to 0 (unlimited) if running within a Rake command

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

The following discussion from gitlab-ce!27299 should be addressed:

  • @reprazent started a discussion: (+1 comment)

    This is either called from a rake task lib/tasks/gitlab/git.rake and from the app/workers/repository_check/single_repository_worker.rb.

    So I'm ok with this.

In the linked example, we were able to change the RPC timeout to 'unlimited' unconditionally, because it happened not to be called from rails controller code. However, I think we need a general-purpose means to detect whether we're running inside rake (or the rails console, for that matter - I've often found myself defining Sidekiq.server? to return true there) so we can extend Gitaly default timeouts there too.

Edited Jun 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading