Skip to content

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

Open

Description

@pjbgf

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

Activity

  1. added
    area/git
    on Aug 17, 2022
  2. added this to the GA milestone on Aug 17, 2022
  3. self-assigned this
    on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/git

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions