helm-git icon indicating copy to clipboard operation
helm-git copied to clipboard

Bug: symlinks not supported

Open dene14 opened this issue 4 years ago • 1 comments

helm-git version: 0.8.1

Steps To Reproduce

  1. Crate an umbrella chart in your git repo
  2. add nested charts as a relative symlinks to the chart in the same directory
  3. try to add this repo with helm-git

The current behavior

  Debug in plugin 'helm-git': repo: ssh://[email protected]:7999/myorg/misc.git ref: master path: charts file: index.yaml sparse: 1
  Debug in plugin 'helm-git': helm_repo_uri: git+ssh://[email protected]:7999/myorg/misc.git@charts?ref=master&sparse=1
  Warning: Permanently added '[bitbucket.example.com]:7999,[172.16.10.100]:7999' (RSA) to the list of known hosts.
  walk.go:74: found symbolic link in path: /tmp/helm-git.Bz8Rpt/charts/infra/charts/appserver resolves to /tmp/helm-git.Bz8Rpt/charts/appserver
  walk.go:74: found symbolic link in path: /tmp/helm-git.Bz8Rpt/charts/infra/charts/strongserver resolves to /tmp/helm-git.Bz8Rpt/charts/strongserver
  walk.go:74: found symbolic link in path: /tmp/helm-git.Bz8Rpt/charts/infra/charts/appserver resolves to /tmp/helm-git.Bz8Rpt/charts/appserver
  walk.go:74: found symbolic link in path: /tmp/helm-git.Bz8Rpt/charts/infra/charts/strongserver resolves to /tmp/helm-git.Bz8Rpt/charts/strongserver
  Error: error evaluating symlink /tmp/helm-git.lq9JeC/infra/charts/appserver: lstat /tmp/helm-git.lq9JeC/appserver: no such file or directory
  Error in plugin 'helm-git': Error while helm_package
  Error: looks like "git+ssh://[email protected]:7999/myorg/misc.git@charts?ref=master" is not a valid chart repository or cannot be reached: plugin "helm-git" exited with error

Contents of the chart directories:

$ ls -l charts/
total 44
drwxrwxr-x 4 dene14 dene14 4096 Sep  4 21:18 appserver
drwxrwxr-x 3 dene14 dene14 4096 Sep  4 21:18 strongserver
drwxrwxr-x 4 dene14 dene14 4096 Sep  4 21:18 infra
$ ls -l charts/infra/charts/
total 0
lrwxrwxrwx 1 dene14 dene14 15 Sep 10 11:16 appserver -> ../../appserver
lrwxrwxrwx 1 dene14 dene14 15 Sep 10 11:16 strongserver -> ../../strongserver

Note that for some reason helm-git tries to use another tmp directory for a nested chart /tmp/helm-git.lq9JeC instead of /tmp/helm-git.Bz8Rpt. As soon as I remove symlinks from umbrella chart everything starts to work properly.

The expected behavior

Symlinks resolved properly.

dene14 avatar Sep 10 '20 08:09 dene14

~I run into the same issue, the strange thing is it works fine on my mac, but I'm not able to execute helm repo add scylla 'git+https://github.com/scylladb/scylla-operator@helm?ref=v1.1&sparse=0' on our CI which is using debian base image :/~

Seems like my cache on my mac resolved the issue for me, purging the cache I also stumble into it on my mac 😞

I'm using Helm v3.5.3 with the latest helm-git 0.10.0 release.

niels-s avatar Mar 23 '21 13:03 niels-s