-
Notifications
You must be signed in to change notification settings - Fork 289
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
fast check skipping repo download #425
Conversation
If the check runs with no filter and 1 version only is requested, the latest commit can be retrieved with a simple git ls-remote. this prevents the repository from being downloaded. Signed-off-by: David Rozé <droze@baylibre.com>
@david-baylibre This PR that was just merged might solve this for you since they also deal with large repos: #418 |
@taylorsilva The bare clone makes a great improvement no matter the parameters and this is awesome. Here are some numbers testing the kernel repo check (2.5GB) to get a better picture. Legacy version (v1.15.0):
-> real 3m10.822s git clone --bare (v1.16.0):
-> real 1m39.176s With git ls-remote (Proposal):
-> real 0m0.665s Some repos are much bigger than 2.50GB, leading to a major waste of time prior to builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks the explanation! I feel happy merging this in since all the tests passed and I can't think of any scenario where this might break someone's pipeline.
Thanks @taylorsilva for the merge. What do you think about the following proposal now the patch has been merged? |
That's worth discussing, but let's not have that discussion in this closed PR which will be hard for people to find. Feel free to open an issue about this for everyone to discuss. On the face of it (so haven't thought deeply about it), I'm hesitant to change defaults on people, but could be convinced if we guarantee version finding behaviour is the same. |
@taylorsilva if I am not mistaken, this PR has been merged after that current latest tag, v1.16. |
@marco-m-pix4d Better late than never! https://github.com/concourse/git-resource/releases/tag/v1.17.0 |
We might not be the only ones to work with big repositories and it takes a long time just to check versions.
Donwloading the whole repo consumes cpu, memory, disk and bandwidth.
If the check runs with no filter, and 1 version only is requested (default as of today), the latest commit can be retrieved with a simple git ls-remote. this prevents the repository from being downloaded.
It's a huge gain, checks run instantly without using any resource!
It'd be nice to change the disable_ci_skip default value to true - people would need to request explicitly to skip commit messages containing "ci skip" - so the fast check would become the default behaviour. What do you guys think?