argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

repo server won't discover manifests from symlinked directories

Open ashi009 opened this issue 1 year ago • 1 comments

Checklist:

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

Describe the bug

repo-server won't discover manifests from symlinked directories.

This is due to filepath.Walk won't follow symlinks:

https://github.com/argoproj/argo-cd/blob/4abc9929281296122db0eace1607583187dd9944/reposerver/repository/repository.go#L1796

To Reproduce

  1. Configure the following repository

    [email protected]:ashi009/argocd-test.git
    
  2. Add an app with this repo's HEAD, with the following path

    alipine/clusters/colima
    
  3. Wait for the controller to pick it up

Expected behavior

Seeing a naked alpine pod from the repo

Screenshots

Version

v2.10.6+d504d2b

Logs

ashi009 avatar Apr 11 '24 14:04 ashi009

Same issue here

ciiiii avatar May 21 '24 04:05 ciiiii

ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and tell us if the issue is still present, please?

andrii-korotkov-verkada avatar Nov 11 '24 07:11 andrii-korotkov-verkada

@andrii-korotkov-verkada I can confirm this issue for current version 2.14.9 for the ApplicationSet Git generator. Not sure if OP's reference is applicable. It seems as if the Git part is only traversing git ls-files instead of operating system specific checked out files and thus not following symbolic links.

sspreitzer avatar Apr 11 '25 14:04 sspreitzer