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#
- Pick any repository whose clone takes more than two minutes on the server's connection.
- 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#
- The 120s value dates from #2482 with no recorded rationale.
- #5614 / #3902 fixed the same shape of problem for
removeWorktree.
- #5005 (open) improves clone error messages, touches the same call, but keeps the 120s budget.