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

Error generating manifests when Helm chart references a dependency more than once

Open fad3t opened this issue 1 year ago • 0 comments

Describe the bug

After switching to Argo 2.10.x, I have one application which I can't sync anymore. Argo CD throws the following ComparisonError:

Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = helm pull --destination /tmp/8c2deb34-5a4e-497b-865e-5e0a641e21be --version 1.0.6 --username ****** --password ****** --repo https://registry.example.net/artifactory/helm/ my-chart failed exit status 1: index.go:370: skipping loading invalid entry for chart "my-chart" "1.0.6" from /helm-working-dir/repository/pDg6o1V4pIuLHTtn4msXuUGuHuc=-index.yaml: validation: more than one dependency with name or alias "emissary-ingress" Error: chart "my-chart" version "1.0.6" not found in https://registry.example.net/artifactory/helm/ repository

I think this is due to https://github.com/helm/helm/pull/12789, a bug introduced by Helm 3.14.x - which is included in Argo CD 2.10. It would be great to update Helm as soon as the next patch version gets released (3.14.3 is scheduled for March 13th).

To Reproduce

The chart contains the following dependencies:

dependencies:
- name: "emissary-ingress"
  version: "~8.9.0"
  repository: "https://app.getambassador.io"
- name: "emissary-ingress"
  version: "~8.9.0"
  repository: "https://app.getambassador.io"
  alias: "public"
  condition: "public.enabled"

Expected behavior

Argo CD should sync the app -- it was the case in Argo CD 2.9.x.

Version

v2.10.2

Logs

Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = `helm pull --destination /tmp/8c2deb34-5a4e-497b-865e-5e0a641e21be --version 1.0.6 --username ****** --password ****** --repo https://registry.example.net/artifactory/helm/ my-chart` failed exit status 1: index.go:370: skipping loading invalid entry for chart "my-chart" "1.0.6" from /helm-working-dir/repository/pDg6o1V4pIuLHTtn4msXuUGuHuc=-index.yaml: validation: more than one dependency with name or alias "emissary-ingress" Error: chart "my-chart" version "1.0.6" not found in https://registry.example.net/artifactory/helm/ repository

fad3t avatar Mar 07 '24 07:03 fad3t