Skip to content
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

git: Add Support for Clone No-op for Commit pinned clones #315

Open
Tracked by #3039
pjbgf opened this issue Aug 17, 2022 · 0 comments
Open
Tracked by #3039

git: Add Support for Clone No-op for Commit pinned clones #315

pjbgf opened this issue Aug 17, 2022 · 0 comments
Assignees
Labels
area/git Git and SSH related issues and pull requests
Milestone

Comments

@pjbgf
Copy link
Member

pjbgf commented Aug 17, 2022

Commit pinned clones do not support the use of LastRevision to shortcirtuit the clone operation.
This means, specially for libgit2, that full clones are executed, causing higher resource consumption.

This sparkled as part of a cncf thread in which a user reported source controller hitting 6000% CPU saturation and 3600% memory saturation with the default resources requests/limits. That resource consumption was observed with 57 sources (most are pinned to a specific git hash).

The implementation could follow similar logic as checkout for branches:
https://github.com/fluxcd/source-controller/blob/3013b5fc3df274d790d017ef98596f3e95073dd9/pkg/git/libgit2/checkout.go#L103-L120

@pjbgf pjbgf added the area/git Git and SSH related issues and pull requests label Aug 17, 2022
@pjbgf pjbgf added this to the GA milestone Aug 17, 2022
@aryan9600 aryan9600 self-assigned this Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git and SSH related issues and pull requests
Projects
Status: No status
Development

No branches or pull requests

2 participants