-
Notifications
You must be signed in to change notification settings - Fork 19
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
No way to disable git mirror #55
Comments
Hello @artem-zinnatullin! Thank you for the report. As far as I can tell setting the host path to k8s-buildkite-plugin/lib/job.jsonnet Lines 140 to 143 in 0e13cac
I've reviewed a few of my pipelines (all running with the default Finally, just to validate - is the above log from the the "job" phase or the "setup" phase on the static Buildkite node? I'm a bit suspicious of it updating an existing repository if you haven't configured git-mirrors, from the above reasoning. |
Yes, it does run with That's why I'm asking for a way to completely disable git mirror functionality, it's a feature of BuildKite Agent that is not enabled by default and I think it's reasonable for k8s integration to also not have it on by default.
This is from the "job phase", git clones in "setup phase" is a separate issue I'm dealing with yeah! (Our repos grow bigger and bigger, cloning became an issue) For context: we're one of the oldest users of this repo (2+ years), at some point I rewrote huge portion of this repo :) |
Cool, makes sense. Out of curiosity, how do you configure treeless clones? Does it all happen in "userland"? Or do you configure buildkite to do this? Wondering whether we also need to make sure the job/init-container (if you use them?) has the proper config.
Hmm! I'm not quite following why it'd do a repeat/update then since the dir would be empty, but I assume it ends up cloning twice (maybe the treeless comes first?). Is there a simple repro/recipe I could use for this? I think it'd be a good case to add a self-test for too for the future. |
We pass BuildKite Agent env var in "userland"
Git mirroring happens in
"Second" clone happens because k8s-buildkite-plugin/lib/job.jsonnet Line 265 in 9a156ca
|
OK; so I think this makes sense as a change and doesn't seem super-complex. I'm rewriting a bunch of the CI to do self-tests with the current commit so I'll see if I can replicate the negative case; and then we can think about a fix. |
Hi team, long time no see!
We've been exploring Partial Git Clones recently and found that Treeless git clones are super fast for us while providing a fully working Git repo.
Now I want to check if we actually gaining anything by using shared Git Mirror dir with Treeless clone or wasting more time on it due to what BuildKite agent does while using git mirror:
From what I see in the code after trying to remove
git-mirrors-host-path
from our custom params is that k8s-buildkite-plugin then defaults to/git-mirrors
and continues to use Git Mirror.Thus, I propose a change when a null value on
git-mirrors-host-path
will disable git mirror feature, while setting a value will enable it with passed path.The change however will be breaking since default behavior will change and some users might have relied on it, for them we will suggest explicitly passing the old default path
/git-mirrors
.I can implement the change if we come to agreement!
wdyt?
Thanks!
The text was updated successfully, but these errors were encountered: