Skip to content

Commits on monorepos with Auto Sync enabled apps cause excessive Ls-Remote requests #26277

@dudinea

Description

@dudinea

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

A commit on a monorepo with multiple applications with Auto Sync enabled
causes a storm of ls-remote requests to the git server: one ls-remote request
is sent for each source of each application that is connected to the monorepo.

When there are thousands of apps pointing to the same repository this may become
kind of a DOS attack on the git server, it may even crash an on-premise
Git server or even get people banned/throttled by their cloud Git providers.

To Reproduce

Create a number of applications with one source
pointing to the same folder in the monorepo and with another
source pointing to some other repository:

sources:
  - repoURL: https://github.com/spmeone/app01
    path: manifests/
    targetRevision: master
  - repoURL: https://github.com/someone/monorepo
    path: shared-manifests/
    targetRevision: master

Have all the applications synchronized.

Perform a commit on the monorepo.

See a storm of requests (see graph below), the number of the requests
will be 2*number of apps.

Expected behavior

ArgoCD should use its per-repository cache of git references and not perform a remote call to resolve references for each application being updated.

Screenshots

Here is the graph of ls-remote requests on a monorepo with 80 applications,
each one having two sources: one pointing to the monorepo and another one pointing
to another repo.

Image

Version

./dist/argocd version
argocd: v3.4.0+f45ee22
  BuildDate: 2026-02-05T02:18:29Z
  GitCommit: f45ee221e5543a948b989228c06aef252d00e957
  GitTreeState: clean
  GoVersion: go1.25.5
  Compiler: gc
  Platform: linux/arm64

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcomponent:application-controllerIssues related to the Application Controller componentcomponent:cacheIssue related to Kubernetes caching, corruption, or cache improvements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions