helm/pkg/chartutil/testdata
Oleg Sidorov f94bac0643 chartutil.ReadValues is forced to unmarshal numbers into json.Number refs #1707 [dev-v3]
Backport of https://github.com/helm/helm/pull/6010 to dev-v3 (the
description below is a copy-paste from the original v2 branch PR).
As https://github.com/helm/helm/pull/6016 is now merged to dev-v3, the
change is reasonably trivial.

This change is an attempt to address the common problem of json number
unmarshalling where any number is converted into a float64 and
represented in a scientific notation on a marshall call. This behavior
breaks things like: chart versions and image tags if not converted to
yaml strings explicitly.

An example of this behavior: k8s failure to fetch an image tagged with a
big number like: $IMAGE:20190612073634 after a few steps of yaml
re-rendering turns into: $IMAGE:2.0190612073634e+13.

Example issue: #1707

This commit forces yaml parser to use JSON modifiers and explicitly
enables interface{} unmarshalling instead of float64. The change
introduced might be breaking so should be processed with an extra care.

Due to the fact helm mostly dals with human-produced data (charts), we
have a decent level of confidence this change looses no functionality
helm users rely upon (the scientific notation).

Relevant doc: https://golang.org/pkg/encoding/json/#Decoder.UseNumber

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
Signed-off-by: Oleg Sidorov <me@whitebox.io>
2019-07-17 10:30:51 +02:00
..
albatross ref(pkg/chart): add validation method to chart 2019-04-05 13:40:06 -07:00
dependent-chart-alias Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
dependent-chart-helmignore Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
dependent-chart-no-requirements-yaml Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
dependent-chart-with-all-in-requirements-yaml Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
dependent-chart-with-mixed-requirements-yaml Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
frobnitz Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
frobnitz_backslash Updating to the k8s label convention 2019-05-07 11:26:31 -04:00
joonix fix appveyor builds (#4934) 2019-01-31 21:31:09 -08:00
mariner ref(pkg/chart): add validation method to chart 2019-04-05 13:40:06 -07:00
moby ref(pkg/chart): add validation method to chart 2019-04-05 13:40:06 -07:00
subpop Merge pull request #5601 from adamreese/v3/capabilities 2019-05-09 14:29:34 -07:00
chartfiletest.yaml feat(2450): add annotations to chart metadata (#2671) 2017-08-16 18:27:13 -04:00
coleridge.yaml chartutil.ReadValues is forced to unmarshal numbers into json.Number refs #1707 [dev-v3] 2019-07-17 10:30:51 +02:00
frobnitz-1.2.3.tgz ref(pkg/chart): add validation method to chart 2019-04-05 13:40:06 -07:00
frobnitz_backslash-1.2.3.tgz ref(pkg/chart): add validation method to chart 2019-04-05 13:40:06 -07:00
genfrob.sh ref(pkg/chart): add validation method to chart 2019-04-05 13:40:06 -07:00
test-values-negative.yaml Feat/schema validation (#5350) 2019-04-26 08:45:03 -07:00
test-values.schema.json Feat/schema validation (#5350) 2019-04-26 08:45:03 -07:00
test-values.yaml Feat/schema validation (#5350) 2019-04-26 08:45:03 -07:00