Problem:
In the case where we want to use the upstream version as the chart version, such as the Fleet chart, we will not set the Version or packageVersion in the packages.yaml. But for the back-compatibility, we allow the packageVersion to be set to 0. This causes the patch is changed to a 3-dight number and results in an unexpected chart version.
Problem: In the case where we want to use the upstream version as the chart version, such as the Fleet chart, we will not set the
Version
orpackageVersion
in thepackages.yaml
. But for the back-compatibility, we allow thepackageVersion
to be set to 0. This causes the patch is changed to a 3-dight number and results in an unexpected chart version.For example, with this package.yaml
we expect to generate the Fleet chart
0.3.5
but we actually get0.3.500+up0.3.5
Fix: Check the value of
packageVersion
and skip changing the patch ifpackageVersion
is 0This bug is not found before because I used the rancher-prom2teams chart, which upstream's patch is 0, to do the tests.