werf / nelm

Nelm is a Helm 3 alternative and werf deployment engine
Apache License 2.0
262 stars 1 forks source link

`werf helm dependency update` panic #56

Open ilya-lesikov opened 3 months ago

ilya-lesikov commented 3 months ago

Before proceeding

Version

2.6.1

How to reproduce

  1. Add remote chart to .helm/Chart.yaml
  2. Do werf helm dependency update .helm
  3. Download this remote chart locally and put it into .helm/charts/mychart, but do not change anything in .helm/Chart.yaml.
  4. Do werf helm dependency update .helm

Result

Got panic:

panic: runtime error: invalid memory address or nil pointer dereference 
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x351fc4d] 
goroutine 1 [running]: 
github.com/werf/werf/v2/pkg/deploy/helm/chart_extender.CopyChartDependenciesIntoCache.func1({0xc0014ab290, 0xa1}) 
 /git/pkg/deploy/helm/chart_extender/chart_dependencies_loader.go:83 +0x12d 
github.com/werf/werf/v2/pkg/deploy/helm/chart_extender.prepareDependenciesDir.func1() 
 /git/pkg/deploy/helm/chart_extender/chart_dependencies_loader.go:135 +0x503 
github.com/werf/logboek/internal/stream.(*LogProcess).DoError(0xc000d26500, 0xc000a18850) 
 /go/pkg/mod/github.com/werf/logboek@v0.6.1/internal/stream/process_types.go:195 +0xbb 
github.com/werf/werf/v2/pkg/deploy/helm/chart_extender.prepareDependenciesDir({0x50b13f0?, 0xc000893e60}, {0xc000084af0, 0x43, 0x50}, {0xc00067ca38, 0x5, 0x8}, 0xc000599940, {0x50dabb8, ...}) 
 /git/pkg/deploy/helm/chart_extender/chart_dependencies_loader.go:112 +0x4b0 
github.com/werf/werf/v2/pkg/deploy/helm/chart_extender.CopyChartDependenciesIntoCache({0x50b13f0, 0xc000893e60}, {0x7ffe48c46d2f, 0x5a}, 0xc000a2db80) 
 /git/pkg/deploy/helm/chart_extender/chart_dependencies_loader.go:77 +0x21b 
github.com/werf/werf/v2/cmd/werf/helm.NewCmd.func2(0xc00100e900, {0xc000a59ee0?, 0x1, 0x0?}) 
 /git/cmd/werf/helm/helm.go:99 +0x14c 
github.com/werf/werf/v2/cmd/werf/helm.NewCmd.func4(0xc00100e900, {0xc000a59ee0, 0x1, 0x1}) 
 /git/cmd/werf/helm/helm.go:215 +0x642 
github.com/werf/werf/v2/cmd/werf/root.SetupTelemetryInit.func1(0xc001026400?, {0xc000a59ee0, 0x1, 0x1}) 
 /git/cmd/werf/root/root.go:248 +0xcb 
github.com/spf13/cobra.(*Command).execute(0xc00100e900, {0xc000a59ea0, 0x1, 0x1}) 
 /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983 +0xabc 
github.com/spf13/cobra.(*Command).ExecuteC(0xc000fc9500) 
 /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff 
github.com/spf13/cobra.(*Command).Execute(...) 
 /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 
main.main() 
 /git/cmd/werf/main.go:45 +0x14f

Expected result

Success.

Additional information

No response