Comment 1 for bug 1613839

Revision history for this message
Drew Freiberger (afreiberger) wrote :

I've run into this in a few situations. juju action.yaml also has the same issue. I have a variable that is type: number (actions.yaml equivalent to float) that doesn't accept a default value of X.0. I feel like this is a yaml pre-processing issue within juju that is truncating the floating point .0 from the values in the parsed yaml before it makes it to the schema gate checks.

I wonder if having a check that a number is an int is valid for a float value as well in the gate check, as I wouldn't expect many applications to require a decimal place (such as 1.0) in their config and not honor a floatkey = <some_int>.

If this is an issue, perhaps we should be handling float in a more string-like fashion with schema checks ensuring that the values are equivalent when typing the string as a float.