-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
Summary
ArgoCD recently added support for configuring the checkout depth of Git repositories, enabling shallow checkouts. This greatly improves the checkout performance for large monorepos. However, the depth option is not applied to submodule checkouts, meaning that monorepos with lots of submodules will still require the reposerver to download entire repository histories and will not benefit as much as possible from shallow clones.
Motivation
Our monorepo checkouts have benefited from setting depth: "1" but they are still very slow because the monorepo organizes code using tens of submodules, each of which has large histories that are downloaded in their entirety by the reposerver. The goal of this proposal is to optimize the checkout of Git submodules, to accelerate the downloading of huge monorepos with lots of submodules.
Proposal
I propose modifying the util/git.Client interface to allow plumbing the depth option through to the code that fetches submodules so that Argo can ultimately optionally add the --depth <depth> arguments to the git submodule update command.