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 appset get` command doesn't show multiple sources details #20902

Closed nitishfy closed 24 minutes ago

nitishfy commented 17 hours ago

Checklist:

Describe the bug

argocd appset get command doesn't show multiple sources details if your appset manifest consists of multiple sources.

To Reproduce

  1. Generate a appset that consists of multiple sources, something like
    apiVersion: argoproj.io/v1alpha1
    kind: ApplicationSet
    metadata:
    name: color-applicationset-multi-source
    namespace: argocd
    spec:
    generators:
    - list:
        elements:
          - namespace: dev
          - namespace: test
          - namespace: uat
    template:
    metadata:
      name: '{{namespace}}-color-appsssss'
    spec:
      project: default
      sources:
        - repoURL: https://github.com/argoproj/argocd-example-apps.git
          targetRevision: HEAD
          path: apps
        - repoURL: https://github.com/argoproj/argocd-example-apps.git
          path: guestbook
          targetRevision: HEAD
      destination:
        server: https://kubernetes.default.svc
        namespace: '{{namespace}}'
  2. Get the appset details using the following command
    argocd appset get color-applicationset-multi-source
  3. Notice that inspite of setting multiple sources, only the first source gets printed.

Expected behavior

All the sources should get printed.

Version

argocd: v2.13.0-rc2+0f083c9
  BuildDate: 2024-09-20T11:59:25Z
  GitCommit: 0f083c9e58638fc292cf064e294a1aa53caa5630
  GitTreeState: clean
  GoVersion: go1.22.7
  Compiler: gc
  Platform: linux/amd64
argocd-server: v99.99.99+unknown
  BuildDate: 1970-01-01T00:00:00Z
  GoVersion: go1.22.0
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.4.3 2024-07-19T16:40:33Z
  Helm Version: v3.15.3+g3bb50bb
  Jsonnet Version: v0.20.0