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

Go panic from kn service delete command #72

Closed
nak3 opened this issue Apr 14, 2019 · 0 comments · Fixed by #73
Closed

Go panic from kn service delete command #72

nak3 opened this issue Apr 14, 2019 · 0 comments · Fixed by #73

Comments

@nak3
Copy link
Contributor

nak3 commented Apr 14, 2019

Version: 9c21b8d

Steps to produce:

1. Create knative service

(e.g)

$ ./kn service create hello-example --image=gcr.io/knative-samples/helloworld-go 

2. Delete the service by kn service delete command

$ ./kn service delete hello-example 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x10b00f4]

goroutine 1 [running]:
github.com/knative/client/pkg/kn/commands.NewServiceDeleteCommand.func1(0xc00011fb80, 0xc0003f9800, 0x1, 0x1, 0x0, 0x0)
	/home/knakayam/.go/src/github.com/knative/client/pkg/kn/commands/service_delete.go:44 +0x104
github.com/spf13/cobra.(*Command).execute(0xc00011fb80, 0xc0003f97a0, 0x1, 0x1, 0xc00011fb80, 0xc0003f97a0)
	/home/knakayam/.go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:762 +0x465
github.com/spf13/cobra.(*Command).ExecuteC(0xc000155680, 0x0, 0x0, 0xc000155680)
	/home/knakayam/.go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
	/home/knakayam/.go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
main.main()
	/home/knakayam/.go/src/github.com/knative/client/cmd/kn/main.go:29 +0x45

Actual result

  • Please refer to step-2

Proposal patch

#73

knative-prow-robot pushed a commit that referenced this issue Apr 15, 2019
This patch uses GetNamespace() utils in service delete command.

Fixes #72
rhuss pushed a commit to rhuss/knative-client that referenced this issue Apr 24, 2019
This patch uses GetNamespace() utils in service delete command.

Fixes knative#72
navidshaikh added a commit to navidshaikh/client that referenced this issue Sep 27, 2019
coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
* Create a tool to properly list changed files in a PR

This will make the "no testing necessary" checking more reliable.

Fixes knative#72

* Assorted nits.
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

Successfully merging a pull request may close this issue.

1 participant