Go Panic when running `odo dev` with minikube
/kind bug
What versions of software are you using?
Operating System:
Ubuntu
Output of odo version:
3.15.0
How did you run odo exactly?
sudo odo dev --logs --port-forward 8000:8000
Actual behavior
Errored on run with a go panic.
Expected behavior
A. Run odo dev as normal (this command and devfile work fine in windows/mac environments with docker desktop). The main differences with this dev's environment is that odo is being run on ubuntu with minikube as the k8s backend, instead of docker-desktop's k8s cluster.
B. The error (Failed to delete inner loop resources: failed to get deployment "<project-name>-app": Get "https://192.168.49.2:8443/apis/apps/v1/namespaces/default/deployments/<project-name>-app": Forbidden) seems like it could be an issue with the minikube configuration, which is understandable. However, in this case, odo should not panic and instead print out a helpful error message.
Any logs, error output, etc?
Error output:
__
/ \__ Developing using the "<project-name>" Devfile
\__/ \ Namespace: default
/ \__/ odo version: v3.15.0 (10b5e8a8f)
\__/
==================================================================================================================================
⚠ You are using "default" namespace, odo may not work as expected in the default namespace.
You may set a new namespace by running `odo create namespace <name>`, or set an existing one by running `odo set namespace <name>`
==================================================================================================================================
↪ Running on the cluster in Dev mode
✓ Web console accessible at http://localhost:20000/
✓ API Server started at http://localhost:20000/api/v1
✓ API documentation accessible at http://localhost:20000/swagger-ui/
Cleaning resources, please wait
Failed to delete inner loop resources: failed to get deployment "<project-name>-app": Get "https://192.168.49.2:8443/apis/apps/v1/namespaces/default/deployments/<project-name>-app": Forbidden
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x2da3040]
goroutine 31 [running]:
github.com/redhat-developer/odo/pkg/logs.(*LogsClient).getLogsForMode(0xc00049f7e0, {0x481d518, 0xc000a54720}, {0xc000062c00?, 0xc000062c60?, 0xc000062cc0?}, {0x35407d4, 0x3}, {0xc000a52400, 0x8}, ...)
/builddir/build/BUILD/gocode/src/github.com/redhat-developer/odo/pkg/logs/logs.go:282 +0x360
created by github.com/redhat-developer/odo/pkg/logs.(*LogsClient).GetLogsForMode
/builddir/build/BUILD/gocode/src/github.com/redhat-developer/odo/pkg/logs/logs.go:208 +0x1d2
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.
Still an issue!
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.
Still an issue...