Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Use a shallow git clone #3142

Closed
sara4dev opened this issue Jun 17, 2020 · 1 comment
Closed

Use a shallow git clone #3142

sara4dev opened this issue Jun 17, 2020 · 1 comment
Assignees
Labels
enhancement flux2 Resolution suggested - already fixed in Flux v2

Comments

@sara4dev
Copy link

sara4dev commented Jun 17, 2020

Right now fluxcd does a full git clone, and it would be faster if we just do the shallow clone. Looks like at some point it had the code to do shallow clone but now its removed - #487

@sara4dev sara4dev added blocked-needs-validation Issue is waiting to be validated before we can proceed enhancement labels Jun 17, 2020
@kingdonb
Copy link
Member

Thank you for the feedback. I think there is a performance reason why shallow clones are not used at first. Running a shallow clone on an interval is expensive for the git host, for example in Homebrew this functionality was removed because of a reason explained in this discussion: Homebrew/discussions#225 – this may have been similar to the reason it was removed from Flux v1. Still this is an important feature and the right tool for the job in certain cases.

In Flux v2, this has been taken into account, and source-controller splits the job of managing the clone out into a separate API that has its own lifecycle and can be configured independently to manage multiple repos, and with different characteristics.

https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1beta1/gitrepositories.md#git-implementation

Shallow cloning is a supported feature in one of the git implementations that runs in source-controller under Flux v2. It will not be possible to backport this work into Flux v1, there is too much to reconsider in the design to rework and include without breaking changes in v1.

Apologies about the length of time that has elapsed since your inquiry. As efforts have been focused on Flux v2, I've recently joined the team to focus on Flux v1 issues, and we have developed a support policy page with references to how community works in our new architecture for Flux v2, different ways to meet us for help. If you've been following our development efforts then of course we hope you are able to upgrade, here's more info on how to find support with that: https://fluxcd.io/support/

@kingdonb kingdonb self-assigned this Feb 19, 2021
@kingdonb kingdonb added flux2 Resolution suggested - already fixed in Flux v2 and removed blocked-needs-validation Issue is waiting to be validated before we can proceed labels Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement flux2 Resolution suggested - already fixed in Flux v2
Projects
None yet
Development

No branches or pull requests

2 participants