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

templateChart: nil pointer dereference to Manager.out when performing dependency update #80

Open
Illya123 opened this issue Apr 26, 2022 · 0 comments

Comments

@Illya123
Copy link

Problem

When trying to execute helmclient.TemplateChart with DependencyUpdate=true the following error is thrown:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x555305]

goroutine 1 [running]:
fmt.Fprintln({0x0, 0x0}, {0xc002317258, 0x1, 0x1})
        C:/Program Files/Go-1.18/src/fmt/print.go:265 +0xa5
helm.sh/helm/v3/pkg/downloader.(*Manager).UpdateRepositories(0xc00221d5f0)
        C:/Users/StrunskyyIllya/go/pkg/mod/helm.sh/helm/v3@v3.8.0/pkg/downloader
/manager.go:653 +0x1a9
helm.sh/helm/v3/pkg/downloader.(*Manager).Update(0xc00221d5f0)
        C:/Users/StrunskyyIllya/go/pkg/mod/helm.sh/helm/v3@v3.8.0/pkg/downloader
/manager.go:188 +0x293
github.com/mittwald/go-helm-client.(*HelmClient).TemplateChart(0xc0007a0730, 0xc
0003c9ae0)
        C:/Users/StrunskyyIllya/go/pkg/mod/github.com/mittwald/go-helm-client@v0
.9.1/client.go:520 +0xb59
rcloud/rcli/cmd.glob..func1(0x39af980, {0xc0000bb880, 0x0, 0x4})
        C:/Users/StrunskyyIllya/git/r-cloud/deployment/scripts/go/rcloud/cmd/ins
tall.go:84 +0x4f8
github.com/spf13/cobra.(*Command).execute(0x39af980, {0xc0000bb800, 0x4, 0x4})
        C:/Users/StrunskyyIllya/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command
.go:860 +0xb67
github.com/spf13/cobra.(*Command).ExecuteC(0x39afc00)
        C:/Users/StrunskyyIllya/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command
.go:974 +0x8b3
github.com/spf13/cobra.(*Command).Execute(0x39afc00)
        C:/Users/StrunskyyIllya/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command
.go:902 +0x2f
rcloud/rcli/cmd.Execute()
        C:/Users/StrunskyyIllya/git/r-cloud/deployment/scripts/go/rcloud/cmd/roo
t.go:32 +0x25
main.main()
        C:/Users/StrunskyyIllya/git/r-cloud/deployment/scripts/go/rcloud/main.go
:9 +0x17

Cause and Fix

Root cause seems to be the same as in #64.

There was a fix provided in #68, but it looks like at least this place was missed.
It looks like there are currently a few problems with the download of dependencies that relate in one way or another to this issue.
It makes sense to unify dependencyUpdate and the refresh of helmCharts into one single place in my opinon, because the same functionality is used in #78 and potentially later in #79.

guitarlum pushed a commit to guitarlum/go-helm-client that referenced this issue Apr 26, 2022
elenz97 added a commit that referenced this issue Apr 27, 2022
Fix for #78 #79 and #80 with some refactoring
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

1 participant