New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for git partial clones #11463
Comments
I think this is a great feature proposal! We are running gocd on kubernetes and we are having trouble with elastic agent starting up very slowly because the material is monorepo. |
If agent slowness is the main concern (rather than server), shallow clones might help if you don't need the entire commit history on your agents for builds, you are not commonly building historical revisions more than 100 revisions back from HEAD and HEAD does not contain references to massive binaries that would need to be pulled anyway. You may also get different performance characteristics on HTTPS vs SSH clones, depending on your repository manager. Otherwise, not much choice but to reduce the size of your repository and rewrite history, or build off a fork with rewritten history? |
We had enabled shallow clone but never cared whether the cloning method was HTTPS or SSH. |
Worth experimenting with. It kind of depends where the slowness is coming from (raw transfer speeds, work the repository manager needs to do etc). There are env vars such as It's also worth noting that shallow clones can be very expensive for the repository manager to deal with and compute if GoCD is having to "unshallow" the clones to fetch the specific revision needed for the build. In some cases and repos that can be slower than not using shallow clones at all. The GitHub blog linked in the description discusses this. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
Issue Type
Summary
It'd be great to have some degree of support for git partial clones.
Implementation Notes
On the server side:
--no-checkout
clones but cannot shallow clone due the aboveOn the client/agent side:
Motivations
n
revisions is likely to be a lot less costly than fetching more revisions on a shallow clone, and a lot less expensive than full unshallowingPossible challenges
--single-branch
2.24.0+
, most performant/reliable in2.29.0+
(?)The text was updated successfully, but these errors were encountered: