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

Panic for bindings without configVersion #209

Open
zuzzas opened this issue Nov 13, 2020 · 2 comments
Open

Panic for bindings without configVersion #209

zuzzas opened this issue Nov 13, 2020 · 2 comments
Milestone

Comments

@zuzzas
Copy link
Contributor

zuzzas commented Nov 13, 2020

While using binding contexts without specifying v1 version (configVersion: v1).

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12f8668]
goroutine 42 [running]:
k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.(*Unstructured).GetNamespace(...)
	/go/pkg/mod/k8s.io/[email protected]/pkg/apis/meta/v1/unstructured/unstructured.go:234
github.com/flant/shell-operator/pkg/hook/binding_context.BindingContext.MapV0(0x173e3d8, 0x2, 0x174700f, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/src/shell-operator/pkg/hook/binding_context/binding_context.go:131 +0x208
github.com/flant/shell-operator/pkg/hook/binding_context.BindingContext.Map(0x173e3d8, 0x2, 0x174700f, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/src/shell-operator/pkg/hook/binding_context/binding_context.go:39 +0x11b
github.com/flant/shell-operator/pkg/hook/binding_context.ConvertBindingContextList(0x173e3d8, 0x2, 0xc000aacfd0, 0x1, 0x1, 0x1, 0x1, 0x7e5130)
	/src/shell-operator/pkg/hook/binding_context/binding_context.go:145 +0x139
github.com/flant/shell-operator/pkg/hook.(*Hook).Run(0xc00009f220, 0x174700f, 0xa, 0xc00081c160, 0x1, 0x1, 0xc00084d678, 0x0, 0x0, 0x0, ...)
	/src/shell-operator/pkg/hook/hook.go:74 +0xf1
github.com/flant/shell-operator/pkg/shell-operator.(*ShellOperator).TaskHandleHookRun(0xc00016efa0, 0x19400a0, 0xc00081e480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/src/shell-operator/pkg/shell-operator/operator.go:431 +0x7a6
github.com/flant/shell-operator/pkg/shell-operator.(*ShellOperator).TaskHandler(0xc00016efa0, 0x19400a0, 0xc00081e480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/src/shell-operator/pkg/shell-operator/operator.go:305 +0x1f0
github.com/flant/shell-operator/pkg/task/queue.(*TaskQueue).Start.func1(0xc0003f2000)
	/src/shell-operator/pkg/task/queue/task_queue.go:341 +0x3e7
created by github.com/flant/shell-operator/pkg/task/queue.(*TaskQueue).Start
	/src/shell-operator/pkg/task/queue/task_queue.go:319 +0x4f
@DTvGe45vc
Copy link

+1

@diafour
Copy link
Contributor

diafour commented Dec 29, 2020

@DTvGe45vc why do you use "v0" (binding without configVersion)?

@shurup shurup changed the title Panic Panic for bindings without configVersion Jan 15, 2021
@diafour diafour added this to the future milestone Mar 31, 2021
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

3 participants