quintush / helm-unittest

BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin.
MIT License
345 stars 69 forks source link

Can not install helm-unittest at v0.2.9 #178

Closed duc2h closed 1 year ago

duc2h commented 1 year ago
Run helm plugin install https://github.com/quintush/helm-unittest
cygpath: not found
./install-binary.sh: 16: cygpath: not found
./install-binary.sh: 19: [[: not found
./install-binary.sh: 72: [[: not found
Support linux-amd6[4](https://github.com/manabie-com/backend/actions/runs/3124909320/jobs/5068778436#step:4:5)
Retrieving https://api.github.com/repos/quintush/helm-unittest/releases/latest
./install-binary.sh: 82: [[: not found
Downloading https://github.com/quintush/helm-unittest/releases/download/v0.2.9/helm-unittest-linux-amd[6](https://github.com/manabie-com/backend/actions/runs/3124909320/jobs/5068778436#step:4:7)4-0.2.[9](https://github.com/manabie-com/backend/actions/runs/3124909320/jobs/5068778436#step:4:10).tgz to location /tmp/_dist/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

[10](https://github.com/manabie-com/backend/actions/runs/3124909320/jobs/5068778436#step:4:11)0 19.0M  100 19.0M    0     0  69.9M      0 --:--:-- --:--:-- --:--:-- 69.9M
./install-binary.sh: [11](https://github.com/manabie-com/backend/actions/runs/3124909320/jobs/5068778436#step:4:12)6: [: linux: unexpected operator
Validating Checksum.
Preparing to install into 
cp: cannot create regular file '': No such file or directory
Error: plugin install hook for "unittest" exited with error
Failed to install helm-unittest
For support, go to https://github.com/kubernetes/helm
quintush commented 1 year ago

Hello @edarha,

I just pushed an update to stabelize the installation script. Try to install it again using the same command (with latest it will pick the latest commit).

If you still have troubles, installing please give me some information what os you are installing the plugin. Also cleaning-up the helm cache path (https://helm.sh/docs/helm/helm/, there is a table showing the default locations of the folders) can help solving the problem, as the plugin installer is caching it's installation.

Greetings, @quintush

artiz commented 1 year ago

Hey @quintush, error is still not fixed for Linux, HELM_PLUGIN_PATH is defined as empty string

cygpath: not found
./install-binary.sh: 16: cygpath: not found
Support linux-amd64
Retrieving https://api.github.com/repos/quintush/helm-unittest/releases/latest
Downloading https://github.com/quintush/helm-unittest/releases/download/v0.2.9/helm-unittest-linux-amd64-0.2.9.tgz to location /tmp/_dist/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 19.0M  100 19.0M    0     0   168k      0  0:01:55  0:01:55 --:--:-- 58625
Validating Checksum.
Preparing to install into
cp: cannot create regular file '': No such file or directory
Failed to install helm-unittest
For support, go to https://github.com/kubernetes/helm
Error: plugin install hook for "unittest" exited with error
quintush commented 1 year ago

Hello @artiz,

Thanks for pointing it out. Did not see the missing path.

Updated the script again with simplification of the path initialization, which should fix the problem.

Greetings, @quintush

artiz commented 1 year ago

@quintush very strange but HELM_PLUGIN_DIR is also empty. export HELM_PLUGIN_DIR=$HOME/.local/share/helm does not fix the issue

quintush commented 1 year ago

Hello @artiz ,

The issue should now be resolved. Sygwin validation was triggered while it should no have been, so that the path was reset to "". I have managed to reproduce the issue van finally verified the correct validation is resolving the issue.

Greetings, @quintush

artiz commented 1 year ago

Hey, @quintush Yep all is fine, issue is resolved. Thank you very much.

BernhardGruen commented 1 year ago

Hey,

it seems a new install only works if done without version. If I use 0.2.9 as version it still does not work. Is it possible that the git tag needs an update too? Or do you plan releasing a new version anyway?

quintush commented 1 year ago

Hello @BernhardGruen,

The tag is just updated, so with specific version the download should also work.

Greetings, @quintush

duc2h commented 1 year ago

hello @quintush i got this issue

$ helm plugin install https://github.com/quintush/helm-unittest --version 0.2.9
Error: Unable to update repository: exit status 1

$ helm plugin install https://github.com/quintush/helm-unittest 
Error: Unable to update repository: exit status 1
BernhardGruen commented 1 year ago

Yes, works now. Many thanks for your really fast reaction to this. @quintush

quintush commented 1 year ago

hello @quintush i got this issue

$ helm plugin install https://github.com/quintush/helm-unittest --version 0.2.9
Error: Unable to update repository: exit status 1

$ helm plugin install https://github.com/quintush/helm-unittest 
Error: Unable to update repository: exit status 1

Hello @edarha,

Can you try to remove the plugin (helm plugin remove unittest) and clean the cache (clean the $HOME/.cache/helm/plugin folder and retry installing?

If that still does not work, can you please tell me which linux distro you are using? There are some small differences.

Greetings, @quintush

duc2h commented 1 year ago

it works fine now, thanks a lot your of effort @quintush