-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
prow.k8s.io podutils should pre-clone kubernetes #18226
Comments
Maybe a better option is to shallow clone? I am sure it will break some ppls job though so might need a knob to disable |
We can't shallow clone because we depend on git describe / tags |
We already have a depth knob for clones |
Also, if there is an existing git repo in the directory that clonerefs is targeting, it works fine -- this is part of the design |
I don't think we can use a depth knob either because we don't know how many commits are between tags. How is this being used in practice? Just to enable depth=1 for shallow clones?
This we should use, is anyone using this yet? Can we document this? |
We have used it from day 0 -- it does not look like the |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
so all we need to do here is create a special clonerefs image for prow.k8s.io that contains an existing clone of kubernetes at we could really use this as sadly shallow clones are not super feasible based on depth (we don't know how far back the tags we need are), but we have 6+? years of development in a big busy repo and the clones are slow. just doing this one-off even would probably help quite a bit. |
Yes, just make sure the mount doesn't 💣 the directory. |
AFAICT that means you must run a copy step from some other location in the image to populate the volume prior to running the normal clonerefs? Is open shift also doing this or something else? Hacky prototype for Kubernetes in #21031 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Well we have a working prototype of this in a test job and it works pretty well. I'd still like to see this roll out more broadly but have had limited time and it's not clear what the acceptable route forward is. The last discussion veered off into other caching problems. I think one option would be to have on every build of clonerefs a differently named image that is this wrapper prototype that adds the copy step and the pre-clone. It would probably be better if clonerefs could be made to reference a structured set of pre-clones (maybe their non-aliased repo paths under some base directory?) and handle the copy so the custom image would just be adding clones and could be generalized. This image also probably needs to be built with docker like the prototype, instead of bazel, unless we want to add clones of Kubernetes's pre-cached repos as test-infra dependencies. (so we can add them to the image with a simple |
Kubernetes/Kubernetes is our one repo where this is particularly pressing for prow.k8s.io, so I'd be happy to ship a non-general approach for a while, I think my concern would be concerns about having prow.k8s.io run a non-standard clonerefs image since we seem to use it as a canary instance. That's probably fine if we:
Most of that is already workable with the prototype image, We'd need to:
Which could be done pretty easily, if there are no objections. Even if we did modify clonerefs itself later we'll need a similar workflow I think to have the actual clones in the image, since those don't belong in the standard image for other users. |
aledbf shared https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ and in particular |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This has only gotten worse, on my local machine: $ time git clone https://github.com/kubernetes/kubernetes
Cloning into 'kubernetes'...
remote: Enumerating objects: 1414278, done.
remote: Counting objects: 100% (437/437), done.
remote: Compressing objects: 100% (319/319), done.
remote: Total 1414278 (delta 195), reused 181 (delta 104), pack-reused 1413841
Receiving objects: 100% (1414278/1414278), 923.65 MiB | 13.34 MiB/s, done.
Resolving deltas: 100% (1022008/1022008), done.
Updating files: 100% (23640/23640), done.
117.14 real 241.59 user 36.35 sys
$ du -h -d0 ./kubernetes
1.3G ./kubernetes I think since #23796 this would be more straightforward to ship. |
So, setting blobless and treeless clones have comparable performance during clone, I think #26590 is probably the most reasonable path forward. blobless clones take ~37s instead of 2+ minutes. |
closing in favor of #26590 |
I couldn't find anything to support that this is already supported.
If it is, we need to be using it for Kubernetes/Kubernetes at least. If not, we could really use this.
What would you like to be added:
pod utils, specifically clonerefs should allow referencing a pre-existing clone when cloning the repo.
perhaps we'd pre-clone a few repos into a custom clone-refs image.
Why is this needed:
cloning kubernetes/kubernetes from scratch is expensive. on my plugged-in relatively unused laptop it took 1m30s just now.
under worse conditions it seems to be taking much longer to do the fetch step. we should be able to start from a recent clone instead of scratch.
I think this is related to the pod pending timeout errors we're seeing all over prow.k8s.io
/area prow
The text was updated successfully, but these errors were encountered: