argoproj / argo-cd

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

ArgoCD UI breaks when spec.template.spec.sources are empty #20904

Open seos-vcbs opened 14 hours ago

seos-vcbs commented 14 hours ago

Checklist:

Describe the bug ArgoCD UI breaks when spec.template.spec.sources are empty

To Reproduce

kind: ApplicationSet
metadata:
  name: foo-backend-support-services
  namespace: bar
  labels:
    argocd.baz.tech/name: foo-backend-support-services
  annotations:
    argocd.paramount.tech/description: |-
      ApplicationSet for 'foo-backend-support-services'.
    k8s.baz.tech/technical-owner: 'foo@example.com'
spec:
  generators:
  - list:
      elements:
      - id: foo-use1-dev
        env: dev
        region: use1
        cluster: foo.dev.aws.viacbs.tech
  template:
    metadata:
      name: '{{id}}'
      namespace: bar
      finalizers:
        - resources-finalizer.argocd.argoproj.io
    spec:
      project: abcd
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
      sources:
      destination:
        name: '{{cluster}}'
        namespace: bar

Expected behavior

ArgoCD UI for my dev app-of-apps project breaks. I am attaching the screenshot.

Screenshots

image

Version

v2.12.4+27d1e64

Logs

crenshaw-dev commented 14 hours ago

Try 2.12.6, there were two PRs related to this.

seos-vcbs commented 14 hours ago

Thank you very much for the quick response. @crenshaw-dev

dee-kryvenko commented 11 hours ago

We just updated to 2.12.7 @crenshaw-dev, and we can see that there is now a validation that prevents this sort of sync, but still the fact that the intent in git was in the ApplicationSet even if was not synced - it breaks the UI on the list of apps screen.