Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error, while pulling helm chart #10683

Closed
shubham1172 opened this issue Feb 17, 2022 · 3 comments
Closed

panic: runtime error, while pulling helm chart #10683

shubham1172 opened this issue Feb 17, 2022 · 3 comments

Comments

@shubham1172
Copy link
Contributor

Helm Go module version: v3.8.0-rc.1.0.20220215042704-bc2f1e08a43a

K8s version: v1.21.1

Cloud Provider/Platform (AKS, GKE, Minikube etc.): KinD

Problem

We are trying to upgrade our helm version from v3.5.3 to v3.8.0 and our e2e tests are breaking. The scenario below used to work on the older version.

Our code looks like this:

pull := helm.NewPull()
pull.RepoURL = daprHelmRepo
pull.Settings = &cli.EnvSettings{}
pull.DestDir = dir

_, err = pull.Run(releaseName) // fails

This is now throwing an error:

panic: runtime error: invalid memory address or nil pointer dereference
        [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x18f57fd]
        
        goroutine 1 [running]:
        helm.sh/helm/v3/pkg/action.(*Pull).Run(0xc00062c1c0, {0x1ddf4bc, 0x4})
        	/home/runner/go/pkg/mod/helm.sh/helm/v3@v3.8.0-rc.1.0.[202](https://github.com/dapr/cli/runs/5231204369?check_suite_focus=true#step:8:202)20215042704-bc2f1e08a43a/pkg/action/pull.go:90 +0x59d
        github.com/dapr/cli/pkg/kubernetes.daprChart({0x7ffe0fafcf77, 0x5}, 0x7)
        	/home/runner/work/cli/cli/src/github.com/dapr/cli/pkg/kubernetes/kubernetes.go:141 +0x1cf

FYI, it panics at line 90 in /pkg/action/pull.go which was last modified by #10527

Can you please help us out here?

@bacongobbler
Copy link
Member

#10547

@shubham1172
Copy link
Contributor Author

Thanks @bacongobbler, I missed that issue. Will try this out!

@shubham1172
Copy link
Contributor Author

@bacongobbler looks like it was not fixed for the pull command.

For the issue above, I was able to get around using the following:

	pull := helm.NewPullWithOpts(helm.WithConfig(config))

When options are not passed, Run in pull.go will still panic because p.cfg.RegistryClient won't be a valid pointer. The fix should be similar to #10547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants