-
Notifications
You must be signed in to change notification settings - Fork 71
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
kpromo: set git clone depth for pr subcommand to prevent downloading the whole repository #1409
Conversation
…the whole repository
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.
I agree, lately running kpromo pr
takes way too much time.
/lgtm
/approve
/hold
@cpanato @saschagrunert do you want to take a look as well?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi, saschagrunert, xmudrii The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
// Set a minimal depth to prevent downloading the whole repository. | ||
Depth: 1, |
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.
The question is if we break something, but yeah let's give it a try.
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.
That's why I tagged you and @cpanato. 😅 But given that this PR changes only the pr
command, I think we can't break that much. And even if we do break it, we would probably realise it very quickly.
Let's give this a try! |
We should consider https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ |
Oh, this is neat! I'll gonna try that and file a PR to change to that :-) |
Unfortunately: |
Ah, we do clones via exec in prow ... it's kinda nice for debugging but does introduce an external runtime dependency ... (we use a container image with git) ... it does also mean you can use the canonical git implementation ... |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds git clone options for cloning the
kubernetes/k8s.io
repository to only clone a depth of 1.The
kubernetes/k8s.io
did grow in the past to a big (1,4GB to download) repository:This change should reduce the downloaded size from 1.27 GiB to currently ~29.29 MiB instead.
So this reduces the amount of data which is downloaded when running
kpromo pr ...
and by that also reduce the time for maintainers to run kpromo.Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?