MuhammedKalkan / OpenLens

OpenLens Binary Build Repository
4.07k stars 272 forks source link

Error when updating/upgrading a helm release (issue not occuring in regular Lens) #174

Closed skhtor closed 1 year ago

skhtor commented 1 year ago

As mentioned in the title, the issue does not occur in Lens.

I'm receiving the below error whenever I try to update or upgrade a helm release within Open Lens. Can confirm colleagues in my team are facing the same issue, Has anyone else seen this and found a fix?

Error: Command failed: /Applications/OpenLens.app/Contents/Resources/x64/helm upgrade ingress-nginx ingress-nginx/ingress-nginx --version 4.7.1 --values /private/var/folders/0k/bd2d0sbn7v92hlkdhsgxm_0h29dm9m/T/1c44105abea6a0ba2e18913ba9b6e285/values.yaml --namespace addons --kubeconfig /var/folders/0k/bd2d0sbn7v92hlkdhsgxm_0h29dm9m/T/kubeconfig-69110954c84e72a65c9fb9da884270cd
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1f97f90]

goroutine 1 [running]:
k8s.io/client-go/discovery.convertAPIResource(...)
k8s.io/client-go@v0.26.0/discovery/aggregated_discovery.go:88
k8s.io/client-go/discovery.convertAPIGroup({{{0x0, 0x0}, {0x0, 0x0}}, {{0xc00072e2a0, 0x15}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...})
k8s.io/client-go@v0.26.0/discovery/aggregated_discovery.go:69 +0x5f0
k8s.io/client-go/discovery.SplitGroupsAndResources({{{0xc000130060, 0x15}, {0xc00053e100, 0x1b}}, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...})
k8s.io/client-go@v0.26.0/discovery/aggregated_discovery.go:35 +0x2f8
k8s.io/client-go/discovery.(*DiscoveryClient).downloadAPIs(0x5000104?)
k8s.io/client-go@v0.26.0/discovery/discovery_client.go:310 +0x478
k8s.io/client-go/discovery.(*DiscoveryClient).GroupsAndMaybeResources(0x0?)
k8s.io/client-go@v0.26.0/discovery/discovery_client.go:198 +0x5c
k8s.io/client-go/discovery/cached/memory.(*memCacheClient).refreshLocked(0xc0002d84e0)
k8s.io/client-go@v0.26.0/discovery/cached/memory/memcache.go:222 +0x57
k8s.io/client-go/discovery/cached/memory.(*memCacheClient).GroupsAndMaybeResources(0xc0002d84e0)
k8s.io/client-go@v0.26.0/discovery/cached/memory/memcache.go:128 +0xc5
k8s.io/client-go/discovery/cached/memory.(*memCacheClient).ServerGroups(0xc000199cc0?)
k8s.io/client-go@v0.26.0/discovery/cached/memory/memcache.go:148 +0x19
k8s.io/client-go/discovery/cached/disk.(*CachedDiscoveryClient).ServerGroups(0xc000199cc0)
k8s.io/client-go@v0.26.0/discovery/cached/disk/cached_discovery.go:118 +0x172
k8s.io/client-go/discovery.ServerGroupsAndResources({0x2dac760, 0xc000199cc0})
k8s.io/client-go@v0.26.0/discovery/discovery_client.go:397 +0xc8
k8s.io/client-go/discovery/cached/disk.(*CachedDiscoveryClient).ServerGroupsAndResources(0x0?)
k8s.io/client-go@v0.26.0/discovery/cached/disk/cached_discovery.go:101 +0x25
helm.sh/helm/v3/pkg/action.GetVersionSet({0x2bc43a98?, 0xc000199cc0?})
helm.sh/helm/v3/pkg/action/action.go:312 +0x42
helm.sh/helm/v3/pkg/action.(*Configuration).getCapabilities(0xc000135c40)
helm.sh/helm/v3/pkg/action/action.go:258 +0x97
helm.sh/helm/v3/pkg/action.(*Upgrade).prepareUpgrade(0xc0001b4b40, {0x7ff7bfeff57f, 0xd}, 0xc000735040, 0x43a65b8?)
helm.sh/helm/v3/pkg/action/upgrade.go:225 +0x30e
helm.sh/helm/v3/pkg/action.(*Upgrade).RunWithContext(0xc0001b4b40, {0x2da4db8, 0xc000c06740}, {0x7ff7bfeff57f, 0xd}, 0x0?, 0x0?)
helm.sh/helm/v3/pkg/action/upgrade.go:143 +0x151
main.newUpgradeCmd.func2(0xc000118900?, {0xc0002c0e60?, 0x2, 0xa})
helm.sh/helm/v3/cmd/helm/upgrade.go:200 +0xb94
github.com/spf13/cobra.(*Command).execute(0xc000118900, {0xc0002c0d20, 0xa, 0xa})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc0008fec00)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
main.main()
helm.sh/helm/v3/cmd/helm/helm.go:83 +0x235

Versions:

OpenLens: 6.5.2-366
Extension API: 6.5.2
Electron: 22.3.3
Chrome: 108.0.5359.215
Node: 16.17.1
$ kubectl --version
Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.4-eks-2d98532
$ helm version
version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.21.3"}

I am using MacOS Ventura 13.6 (EDIT: Intel based Macbook)

jkroepke commented 1 year ago

@soony88 OpenLens will not receive bugfixes anymore. Thats something which is not in our control.

You could try update the helm binary /Applications/OpenLens.app/Contents/Resources/x64/helm by download the binary from here https://github.com/helm/helm/releases and copy it to the path above

skhtor commented 1 year ago

@jkroepke Thanks for that, replacing the helm binary worked for me,

Would be nice if they allowed us to provide a path to our system helm installation, rather than use the one that's pre-packaged

jkroepke commented 1 year ago

This repository only builds OpenLens without touching the source.

You can create the feature request here: https://github.com/lensapp/lens/, however the OpenLens development has been stop. No futures changes are planned/expected.