Xcode Bots should not delete the git repo when cleaning; a 1 minute test takes 20 minutes

Originator:xenadu
Number:rdar://23073467 Date Originated:10/12/2015
Status:Open Resolved:
Product:Xcode Product Version:7
Classification: Reproducible:Yes
 
Xcode Bots should not re-clone the entire repo (with all history) when set to clean. This causes our integrations to take up to 15-20 minutes to complete where most of the time is spent re-downloading the repo over and over.

With git there isn't really a point in having clean delete the repo anyway, but assuming that behavior is kept the clone should do a shallow clone of only the branch being integrated. This would tremendously speed up the integrations.

Steps:
1. Setup an Xcode bot to point to a remote repo (eg: Github)
2. Set the bot to Clean Always (which is ideal from a testing perspective)
3. Watch as the bot takes *forever* to download the entire repo's history on every single integration

Expected results:
The *smart* thing to do would be to cache the git repo and do a fetch, then check out a disconnected head of the branch being integrated into a separate build location. That way you could ensure a pristine copy of the source without re-downloading.

Failing that, just do a shallow clone. It is the ultimate waste of bandwidth to repeatedly download and delete the entire history of the repo for every single bot.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!