Skip to content

Image Update Automation stops working when git clone takes a long time #296

Open
@martinzellner

Description

@martinzellner

Describe the bug

For our git repo with a lot of commits, the image update automation stopped working.
As increasing the timeouts for the git clone [1] did not help we decided to squash a large part of the git history which dramatically reduced the time to clone the repo and also fixed the image update automation. Of course, this comes with the cost of losing the commit history.

Therefore we kindly ask if it would be possible to enable the use of git's shallow clone functionality [2], which would enable faster cloning without having to squash the git history.

[1] https://fluxcd.io/docs/components/source/api/#source.toolkit.fluxcd.io/v1beta1.GitRepository
[2] https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt

Steps to reproduce

  1. Install Flux with image update automation
  2. Increase the git history to a significant size such that a full git clone takes > 8 seconds
  3. Observe image automation failing
  4. Squash the commits in the git repository to archive shorter cloning times
  5. Observe image automation working again

Expected behavior

We would like flux to use GIT's shallow clone functionality [1].

[1] https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

N/A

Flux check

N/A

Git provider

Bitbucket

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions