Use partial (blobless) git clones and auto-recovery on fetch failure#729
Use partial (blobless) git clones and auto-recovery on fetch failure#729stratakis wants to merge 1 commit into
Conversation
Enable filters=["blob:none"] for partial clones reducing .git/objects from ~800MB to ~250MB per build directory. Enable clobberOnFailure so failed fetches wipe and re-clone instead of failing the build.
|
This will save a lot of space for newly created build dirs, so to see the benefits, the buildbot admins should clean up their build dirs. Basically with this change on a worker which would have 8 builders, 4 active branches, it will save roughly 17GB of disk space, plus the pr_ directories would be smaller as well. Plus when clobberOnFailure gets active it will reclone with the blob:none option so builders that somehow failed the fetch will get the benefit (although that would depend on fetching failure), but I think it's good to have this there nonetheless. |
|
I didn't know
|
zware
left a comment
There was a problem hiding this comment.
I'm definitely on board with this. I've been less than thrilled with the disk usage lately and have wondered about switching to a shallow clone freshly pulled every build, but that would entail a 45MB download on every build rather than a nearly 1GB download every now and then. Blobless (maybe even treeless?) seems like a nice middle ground, assuming everybody has a new enough git; thank you for beating me to figuring it out :)
treeless should save like 100+mb per fetch, but I since it needs to fetch extra on every checkout and it will slowly accumulate anyway I don't think it's worth adding it there. I believe the blobless one would be the best for the buildbots (but maybe in the future treeless could be explored?). From https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ :
|
|
Filled 2 RFEs for buildbot that could help with the situation. |
Enable filters=["blob:none"] for partial clones reducing .git/objects from ~800MB to ~250MB per build directory.
Enable clobberOnFailure so failed fetches wipe and re-clone instead of failing the build.