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
{{ message }}
Repository navigation
Integers bigger 1M are being converted into exponential form #12195
I would suggest, that unless you plan on doing numeric operations on these values, simply represent them as a string:
someVarOne: "999999"
someVarTwo: "1000000"
(and if you do plan on doing numeric operations, use casts/printf to format the numbers as expected)
Helm itself, I don't think will be converting int -> float here. Rather, one of the libraries/frameworks that Helm uses to parse yaml. First, it would need to be identified where/what this conversion is happening. Then it would need to be understood if this conversion is the expected behavior. Then finally an issue raised upstream (presumably), a fix issued, then Helm would need to incorporate that fix. If you want to take on that investigation, I can point to the code where Helm looks to parse/handle values.
The guilty package is sigs.k8s.io/yaml, v1.3.0, released on Sep 23, 2021. It looks abandoned and I doubt it's going to be fixed.
The issue has somewhat bigger scope because we observe very questionable behavior. And this particular package is just an implementation. For example, that package can be replaced with another one.
simply represent them as a string:
I do. And very unhappy with that. Too many workarounds, too many implicit stuff. Not only in helm.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Reacted by Daniel Martinez Olivas and Vladimir Kuznichenkov
Activity
gjenkins8 commentedon Jul 18, 2023
Some part of the yaml parsing seems to be converting the seven-digit value into a float:
https://helm-playground.com/#t=LTBQG9wAgOgNQIYBsCuBTAzjDB7AtmogE4AqA7jlAD5QAORAlgHYAuAZlAEQCkJnUAXwERo8ZOiy4CxcpRr1m7Ltwz8hoIA&v=LQhQGcHsFsFMDUCGAnA8gO1gLgAQE4DCIYEUAVAd0lwEIaBLdAFxwEYAGTroA
template:
values.yaml
output:
(unsure which part)
gjenkins8 commentedon Jul 19, 2023
I would suggest, that unless you plan on doing numeric operations on these values, simply represent them as a string:
(and if you do plan on doing numeric operations, use casts/printf to format the numbers as expected)
Helm itself, I don't think will be converting int -> float here. Rather, one of the libraries/frameworks that Helm uses to parse yaml. First, it would need to be identified where/what this conversion is happening. Then it would need to be understood if this conversion is the expected behavior. Then finally an issue raised upstream (presumably), a fix issued, then Helm would need to incorporate that fix. If you want to take on that investigation, I can point to the code where Helm looks to parse/handle values.
mearsten commentedon Jul 20, 2023
Thank you, but the place can be found easily. It's here:
helm/pkg/chart/loader/load.go
Lines 105 to 107 in a50206f
The guilty package is sigs.k8s.io/yaml, v1.3.0, released on Sep 23, 2021. It looks abandoned and I doubt it's going to be fixed.
The issue has somewhat bigger scope because we observe very questionable behavior. And this particular package is just an implementation. For example, that package can be replaced with another one.
I do. And very unhappy with that. Too many workarounds, too many implicit stuff. Not only in
helm.mearsten commentedon Jul 20, 2023
I just checked https://github.com/go-yaml/yaml as a drop-in replacement. Works fine but should be tested thoroughly because there are some minor differences (yes/no, on/off, octals).
github-actions commentedon Nov 2, 2023
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
stavros-k commentedon Nov 2, 2023
Not stale
github-actions commentedon Feb 1, 2024
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
ksonney commentedon Mar 26, 2024
Not complete, still an issue as of Helm 3.14.3
dmartzol commentedon May 28, 2024
Still an issue as of Helm 3.15.1
patsevanton commentedon Sep 10, 2024
How are you fixed issue?
patsevanton commentedon Sep 10, 2024
workaround: