You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid floating-point values as much as possible, and never use them in spec. Floating-point values cannot be reliably round-tripped (encoded and re-decoded) without changing, and have varying precision and representations across languages and architectures.
What happened?
In crossplane-contrib/provider-upjet-gcp#623 various fields that appear to really be integers (e.g.
port
) are generated with type*float64
. This led to a request to addpaved.GetFloat()
- some context and discussion in crossplane/crossplane-runtime#778.You're not supposed to use floats in Kubernetes APIs. From https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#primitive-types:
See for example https://github.com/kubernetes-sigs/json, which deserializes JSON numbers into
int64
where possible.How can we reproduce it?
Take a look at the generated types in crossplane-contrib/provider-upjet-gcp#623.
The text was updated successfully, but these errors were encountered: