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
we receive Error: validation: chart.metadata.version "2.18.2-branch.testing.79682.0162870" is invalid
Workarounds
remove the leading 0 in the last set of runes following the period:
Set the helm chart version as follows:
version: 2.18.2-branch.testing.79682.162870
run cr package
we receive Successfully packaged chart in....
add one or more non-digit runes to the set of runes following the period:
Set the helm chart version as follows:
version: 2.18.2-branch.testing.79682.016a870
run cr package
we receive Successfully packaged chart in....
Discussion
It seems that the set of runes following a period or hyphen is interpreted as a number rather than a string if all runes are digits. The presence of the leading 0 causes an error when parsing the runes as a number. This was unexpected.
Related issues
AppVersion treated as decimal number #362 discusses a similar issue with appVersion, and where the entire value is numeric. This differs from this issue which identifies the problem in version and where a portion following a period.
Recreation steps
Install the latest chart releaser version:
Set the helm chart version as follows:
run
cr packagewe receive
Error: validation: chart.metadata.version "2.18.2-branch.testing.79682.0162870" is invalidWorkarounds
remove the leading
0in the last set of runes following the period:Set the helm chart version as follows:
run
cr packagewe receive
Successfully packaged chart in....add one or more non-digit runes to the set of runes following the period:
Set the helm chart version as follows:
run
cr packagewe receive
Successfully packaged chart in....Discussion
It seems that the set of runes following a period or hyphen is interpreted as a number rather than a string if all runes are digits. The presence of the leading
0causes an error when parsing the runes as a number. This was unexpected.Related issues
appVersion, and where the entire value is numeric. This differs from this issue which identifies the problem inversionand where a portion following a period.