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

SIGSEGV when parsing OpenOAS not contianing kuadrant extensions #64

Closed
azgabur opened this issue Apr 29, 2024 · 1 comment
Closed

SIGSEGV when parsing OpenOAS not contianing kuadrant extensions #64

azgabur opened this issue Apr 29, 2024 · 1 comment
Assignees

Comments

@azgabur
Copy link
Contributor

azgabur commented Apr 29, 2024

When testing kuadrantctl binary I encountered a SIGSEGV while generating an AuthPolicy object.
I ran kuadrantctl generate kuadrant authpolicy --oas petstore.yaml where petstore.yaml is https://github.com/Kuadrant/kuadrantctl/blob/102017b62d2f6f8bf2398c3a24fb2b6edfe01c38/examples/oas3/petstore.yaml
Notably this OpenOAS yaml does not have any kuadrant extensions so I expect some result like "Nothing to generate" or AuthPolicy without restrictions.

Error message:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1582d33]

goroutine 1 [running]:
github.com/kuadrant/kuadrantctl/pkg/gatewayapi.HTTPRouteObjectMetaFromOAS(0xc0004b96f0?)
	/github/workspace/pkg/gatewayapi/http_route.go:22 +0x73
github.com/kuadrant/kuadrantctl/cmd.buildAuthPolicy(0xc0005521b0?)
	/github/workspace/cmd/generate_kuadrant_authpolicy.go:68 +0x2a
github.com/kuadrant/kuadrantctl/cmd.runGenerateKuadrantAuthPolicy(0xc000558900?, {0x1948200?, 0x4?, 0x1948204?})
	/github/workspace/cmd/generate_kuadrant_authpolicy.go:56 +0x10b
github.com/spf13/cobra.(*Command).execute(0xc00056d500, {0xc00054a7a0, 0x2, 0x2})
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0xc00056c000)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(0xc000052250?)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:992 +0x13
main.main()
	/github/workspace/main.go:27 +0x4a
@jasonmadigan jasonmadigan self-assigned this Apr 29, 2024
@jasonmadigan
Copy link
Member

#65

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

2 participants