Skip to content

[Bug]: Clone fails when git clone exceeds a fixed 120s timeout #9780

Description

@eshatalov

Area

apps/server (SourceControlRepositoryService)

Summary

SourceControlRepositoryService.cloneRepository runs git clone with a hardcoded timeoutMs: 120_000. Any clone that takes longer than two minutes, whether because the repository is large or the link is slow, is killed mid-download and surfaces as the generic toast:

Clone failed. Source control repository operation cloneRepository failed for unknown: The source control operation could not be completed.

The trace log shows the real cause: GitCommandError: ... Git command timed out.

Clone duration scales with repository size and network speed, so any fixed budget strands someone. Every push variant in GitVcsDriverCore already runs with timeoutMs: null for this reason. Clone should follow the same precedent.

Steps to reproduce

  1. Pick any repository whose clone takes more than two minutes on the server's connection.
  2. Clone it via "Add project from remote" in the web app.

Expected

The clone completes, or fails with the actual git error.

Actual

At 120s the clone is killed and the generic "could not be completed" toast appears. Nothing indicates a timeout.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions