argoproj / argo-cd

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

App sync fails with 'failed to compare revisions for source 1 of 2' when new source is introduced first #20900

Open DerekTBrown opened 17 hours ago

DerekTBrown commented 17 hours ago

Checklist:

Describe the bug

57563802-c076-413e-8346-4ea5d01a57ab

This indicates to me that ArgoCD is performing comparisons between each index in the source array (i.e. old[0] vs new[0]), instead of pattern matching between source repos/names when comparisons are performed.

To Reproduce

  1. Create an application with a single source, a helm chart repo.
  2. Sync the application.
  3. Add a second source, in index 0, a git repository.
  4. Attempt to sync the application.

Expected behavior

I would expect that ArgoCD would perform comparisons between sources with the same repositoryUrl, rather than naively comparing between source indexes.

Version

v2.12.4+27d1e64
andrii-korotkov-verkada commented 17 hours ago

We have this PR merged https://github.com/argoproj/argo-cd/pull/20470. Do you think we can build on top of that for matching?