Kuadrant / kuadrantctl

Kuadrant configuration command line utility
Apache License 2.0
6 stars 12 forks source link

SIGSEGV on generating resources with a spec without x-kuadrant extensions #65

Closed jasonmadigan closed 2 months ago

jasonmadigan commented 2 months ago

Quick fix to resolve a small bug:

https://github.com/Kuadrant/kuadrantctl/issues/64

We could make this more complex by detecting the many permutations of inclusion of x-kuadrant extensions in specs, to warn/panic if none are found. That may be a better fix longer term (could be addressed this way as a follow-on PR if needs be - this gets us out of a hole right now).

Verifying

# With kuadrantctl 0.2.0
kuadrantctl generate kuadrant authpolicy --oas ./examples/oas3/petstore.yaml

=>

big old SIGSEGV

With this patch, no panic.

Have also patched HTTPRouteGatewayParentRefsFromOAS and HTTPRouteHostnamesFromOAS which have a similar bug.

jasonmadigan commented 2 months ago

thanks @eguzki - patched up