-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat(kuma-cp): intOrString as decimal in the API #5768
feat(kuma-cp): intOrString as decimal in the API #5768
Conversation
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
173f5ce
to
f286b0e
Compare
@@ -159,8 +159,13 @@ func configureSuccessRate( | |||
} | |||
|
|||
if conf.StandardDeviationFactor != nil { | |||
outlierDetection.SuccessRateStdevFactor = util_proto.UInt32(*conf.StandardDeviationFactor) | |||
dec, err := v1alpha1.NewDecimalFromIntOrString(*conf.StandardDeviationFactor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we'd have a type in between here to avoid dealing with these impossible errors. Maybe we could even panic here? It has been validated after all...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how could we introduce type in between because of #5768 (comment)
It's a good question whether we should panic or not after we validate in the first place.
In this PR I'd like to keep the err, but I'd love to resume a discussion in form of the issue, MADR or offline discussion within the team.
Use
IntOrString
in API for decimal.Checklist prior to review
syscall.Mkfifo
have equivalent implementation on the other OS --UPGRADE.md
? --> Changelog:
entry here or add aci/
label to run fewer/more tests?