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

Bug: Error with helm 3.4.0

Open revengel opened this issue 5 years ago • 6 comments

With helm 3.3.4 works well

helm-git version: 0.8.1

Steps To Reproduce

  1. Create some chart
  2. add other charts as dependencies to chart. These chart dependencies may contain other dependencies.
dependencies:
  - name: test
    version: "0.1.0"
    alias: test1
    condition: test1.enabled
    repository: git+https://example.com/k8s/helm-chart.git@/?ref=master
  - name: other
    version: 0.2.0
    alias: test1
    condition: test1.enabled
    repository: git+https://example.com/k8s/helm-chart-another.git@/?ref=master
  1. run dependency update command
helm dep up
  1. command failed
Error: no cached repository for helm-manager-05232da54bb3f2865c17b9a24181dbe0a39ce1d9a6aa0ba594ae5cd40c8a9817 found. (try 'helm repo update'): open ~/.cache/helm/repository/helm-manager-05232da54bb3f2865c17b9a24181dbe0a39ce1d9a6aa0ba594ae5cd40c8a9817-index.yaml: no such file or directory
Error in plugin 'helm-git': Error while helm_dependency_update
Error: no cached repository for helm-manager-d0546a2da8fb132158b42af3e44b5a48f0193d70b24ceabf62401b45ed1a3d40 found. (try 'helm repo update'): open ~/.cache/helm/repository/helm-manager-d0546a2da8fb132158b42af3e44b5a48f0193d70b24ceabf62401b45ed1a3d40-index.yaml: no such file or directory
Error in plugin 'helm-git': Error while helm_dependency_update
...Unable to get an update from the "git+https://example.com/k8s/helm-chart.git@/?ref=master" chart repository:
        plugin "helm-git" exited with error
...Unable to get an update from the "git+https://example.com/k8s/helm-chart-another.git@" chart repository:
        plugin "helm-git" exited with error

revengel avatar Nov 10 '20 12:11 revengel

#122 might fix your issue. Can you have a try? Thanks

aslafy-z avatar Nov 11 '20 15:11 aslafy-z

#122 might fix your issue. Can you have a try? Thanks

The same error

dependencies:
  - name: test
    version: "0.1.0"
    alias: test1
    condition: test1.enabled
    repository: git+https://example.com/k8s/helm-chart.git@/?ref=master&depupdate=1

helm - 3.4.1 helm-git plugin installed from #122 pull request


helm - 3.4.1 helm-git - 0.9.0

dependencies:
  - name: test
    version: "0.1.0"
    alias: test1
    condition: test1.enabled
    repository: git+https://example.com/k8s/helm-chart.git@/?ref=master

Another error:

Error in plugin 'helm-git': Target file name has to be either 'index.yaml' or a tgz release
Save error occurred:  could not find : chart percona not found in git+https://example.com/k8s/helm-chart.git@/?ref=master
Deleting newly downloaded charts, restoring pre-update state
Error: could not find : chart percona not found in git+https://example.com/k8s/helm-chart.git@/?ref=master

revengel avatar Nov 11 '20 20:11 revengel

This is still happening, any theories why? I could try and take a look at the plugin and submit a PR but would need some context on why this might be happening.

I've had to rollback to Helm 3.3.X in order to be able to use the plugin, and the alternatives don't satisfy my needs.

TiagoJMartins avatar Jan 15 '21 12:01 TiagoJMartins

https://github.com/aslafy-z/helm-git/issues/134 These are the same problems I think

I'm finding it's related to --skip-refresh when updating dependencies. It only seems to happen with helm 3.4.0+ but I can't tell what changed

FalconerTC avatar Feb 23 '21 19:02 FalconerTC

It looks like this is the commit that broke things (https://github.com/helm/helm/commit/9cb90a8b234f98c16aef0918cba92d83061d7c97) merged in the following PR (https://github.com/helm/helm/pull/8478). I'm not fully understanding why is causes issues. It seems like charts work correctly if they have a requirements.lock file

FalconerTC avatar Feb 23 '21 20:02 FalconerTC

I'm not quite sure if I'm hitting this same issue or not, but I've been trying to add Requarks/wiki to no avail with helm-git either directly or through helmfile.

$ helm version
version.BuildInfo{Version:"v3.5.3", GitCommit:"041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622", GitTreeState:"dirty", GoVersion:"go1.16"}

I've been trying to find the correct syntax for the URL, but seem to be getting similar errors as above with some URLs, but then also something different when trying with debug like so:

$ HELM_GIT_DEBUG=1 helm fetch "git+https://github.com/Requarks/wiki@dev/helm?ref=dev"               
Debug in plugin 'helm-git': repo: https://github.com/Requarks/wiki ref: dev path: dev file: helm sparse: 1 depupdate: 1
Debug in plugin 'helm-git': helm_repo_uri: git+https://github.com/Requarks/wiki@dev?ref=dev&sparse=1&depupdate=1
cat: dev/helm: Is a directory
Error: plugin "helm-git" exited with error

What is weird is that this works for other repositories with similar contents, but this does specify dependencies and also has the chart in the repository.

quulah avatar Apr 10 '21 06:04 quulah

Are these error still showing with Helm Git latest release?

@quulah your fetch is not valid, you must use helm fetch "git+https://github.com/Requarks/wiki@dev/helm/index.yaml?ref=main" or helm fetch "git+https://github.com/Requarks/wiki@dev/helm/wiki-2.2.0.tgz?ref=main"

aslafy-z avatar Sep 23 '22 19:09 aslafy-z

All tests passes with 3.4.0 on my side, see https://github.com/aslafy-z/helm-git/pull/216. Closing this issue for now on. Feel free to re-open if you need so.

aslafy-z avatar Oct 06 '22 12:10 aslafy-z