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

Reject null parameter values rather than crash. #1608

Merged
merged 1 commit into from
Jul 17, 2020
Merged

Conversation

porridge
Copy link
Member

What this PR does / why we need it:

Reject in a human-friendly manner as below rather than panic with a stack trace.

$ kubectl kudo install kafka -P a.yaml 
Error: could not parse parameters: errors while unmarshaling following keys of the parameter file a.yaml: a has a null value (https://yaml.org/spec/1.2/spec.html#id2803362) which is currently not supported
$ echo $?
255

Fixes #1602

Signed-off-by: Marcin Owsiany <mowsiany@D2iQ.com>
Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚢 Though we probably need this check on the server-side (IAW) too.

Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@porridge
Copy link
Member Author

Nice! ship Though we probably need this check on the server-side (IAW) too.

I believe it crashed in the same code. The line numbers and function names differ between the stack traces because the binaries were built at different commits and there was a refactoring in the meantime.

@porridge porridge merged commit 638c4a6 into main Jul 17, 2020
@porridge porridge deleted the porridge/fix-null branch July 17, 2020 11:31
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 this pull request may close these issues.

KUDO crashes on null parameter values
3 participants