devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.29k stars 359 forks source link

Error 'Chart.yaml file is missing' reported for helm dependency update when custom chart name is used within dependency #2488

Closed j-m-harris closed 1 year ago

j-m-harris commented 1 year ago

What happened?

While deploying a dependency with a custom chart name an error is reported for helm dependency update, though the helm upgrade succeeds.

myapp deploy:myapp error running helm dependency update:  error executing 'helm dependency update --kube-context minikube': Error: Chart.yaml file is missing
myapp deploy:myapp Deployed helm chart (Release revision: 1)

What did you expect to happen instead?

helm dependency update should use the same custom chart name as helm upgrade to avoid an error.

How can we reproduce the bug?

Using devspace 5 config file schema with devspace 6.2.3.

Chart name is defined in a dependency, although I don't know if that is relevant to this bug.

main devspace.yaml:

version: v1beta11
dependencies:
  - name: myapp
    source:
      git: git@gitlab:myapp.git

myapp devspace.yaml specifies a custom helm chart name:

version: v1beta11
deployments:
  - name: myapp
    helm:
      chart:
        name: ./chart

Invoking helm directly in the devspace dependency checkouts:

cd ~/.devspace/dependencies/git-gitlab-myapp-master
helm dependency update --kube-context minikube # fails
helm dependency update ./chart --kube-context minikube # works

Local Environment:

j-m-harris commented 1 year ago

Thanks for the quick fix!