buildkite / buildkite/agent

Support Shallow Clones

Open
#437 10 comments 38 reactions 0 assignees View on GitHub
enhancement git
Dominant language
Go
Stars
1.1k
Forks
378
Avg merge
2d 6h
Merged PRs (30d)
74

Description

The main idea is that for larger repos a full fetch is not necessary and slower.

A few key points:

1. in shallow mode, repositories should not be cached between builds (shallow clones are finicky and should be made fresh each time)
2. the shallow clone should just attempt to fetch the specific sha1 the test needs

This should help not overload upstream providers with a lot of fetches and should speed up the initial fetch a lot.

I'm optimizing for the scenario where host machines are likely to have an entirely cold repo root cache and the download will take a significant amount of time. Especially in events when upsteam might be feeling a bit sluggish like during the github outage on Mar 14, 2017.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.