argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
18.04k stars 5.51k forks source link

manifest-generate-paths annotation and Multiple Sources #18267

Open Emmerson-Miranda opened 6 months ago

Emmerson-Miranda commented 6 months ago

Hello,

Checklist:

Context

I have argo applications with two sources:

The external git repo has a webhook that notifies argo when we push changes.

In my applications I am trying to use 'argocd.argoproj.io/manifest-generate-paths' as described here because I have a mono repo, the value I am using is a relative path inside the external git repo .

argocd.argoproj.io/manifest-generate-paths: ./common-config.yaml;./my-cluster/my-app-override-values.yaml

Describe the bug Looks like 'argocd.argoproj.io/manifest-generate-paths' does not work when I am using multiple sources, because I am getting a warning and application does not get updated.

To Reproduce

Expected behavior The applications that uses argocd-vault-plugin-helm, external git repos and 'argocd.argoproj.io/manifest-generate-paths' annotation should refresh when a change is happening in one specific file or files inside the external git repo.

Version

I am using argo v2.10.5+335875d

Logs

time="2024-05-16T11:44:36Z" level=warning msg="Failed to store cached manifests of previous revision for app my-app: cache: key is missing"
blakepettersson commented 4 months ago

I think the issue you're having is with argocd-vault-plugin, not with manifest-generate-paths. From taking a quick glance, I cannot see that there's any reason why multi-sources wouldn't work with manifest-generate-paths. IIRC argocd-vault-plugin doesn't support multi-sources at all.

jorgelon commented 2 months ago

i get several "Failed to store cached manifests of previous revision for app XXXX cache: key is missing" errors too. In my case I use 2 manifest-generate-paths and only 1 application source.

argocd.argoproj.io/manifest-generate-paths: apps/system/kustomize/folder/folder/;apps/system/folder/folder/folder/../../releases/

i will check if the ../../ is the reason

I need to make a hard refresh to make it work

jorgelon commented 2 months ago

nah, the cause is not the ../../ thing. I disable manifest-generate-paths for now

andrii-korotkov-verkada commented 2 weeks ago

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