Helm: Cannot install/fetch latest chart if 'pre-release' version

Created on 6 May 2017  ·  3Comments  ·  Source: helm/helm

Affected helm version: v2.4.1

Issue

helm [install | fetch] <chart repo>/<chart> fails if latest <chart> in <chart repo> has a "pre-release" version -- that is, contains additional values beyond, say v0.1.0, such as v0.1.0-alpha.1 or v0.1.0-dev-sha.abc1234.

Details

Working in v2.3.1:

$ helm version
Client: &version.Version{SemVer:"v2.3.1", GitCommit:"32562a3040bb5ca690339b9840b6f60f8ce25da4", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.3.1", GitCommit:"32562a3040bb5ca690339b9840b6f60f8ce25da4", GitTreeState:"clean"}

$ helm search -r workflow-dev
NAME                        VERSION                                 DESCRIPTION
workflow-dev/workflow       v2.13.1-dev-20170504190907-sha.3d6bbf9  Deis Workflow

$ helm fetch workflow-dev/workflow
$ ls
workflow-v2.13.1-dev-20170504190907-sha.3d6bbf9.tgz

Not working in v2.4.1:

$ helm version
Client: &version.Version{SemVer:"v2.4.1", GitCommit:"46d9ea82e2c925186e1fc620a8320ce1314cbb02", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.4.1", GitCommit:"46d9ea82e2c925186e1fc620a8320ce1314cbb02", GitTreeState:"clean"}

$ helm search -r workflow-dev
NAME                        VERSION                                 DESCRIPTION
workflow-dev/workflow       v2.13.1-dev-20170504190907-sha.3d6bbf9  Deis Workflow
...

$ helm fetch workflow-dev/workflow
Error: chart "workflow" not found in workflow-dev index. (try 'helm repo update'). No chart version found for workflow-

However, if the latest chart in the repo has an 'official' release version, they are successfully fetched in v2.4.1:

 $ helm search -r jenkins
NAME            VERSION DESCRIPTION
stable/jenkins  0.6.2   Open source continuous integration server. It s..

 $ helm fetch stable/jenkins

 $ ls
jenkins-0.6.2.tgz

Similar/Related Issues

https://github.com/kubernetes/charts/issues/999 was filed specifically for the stable/traefik chart.

Indeed, as we see, this chart happens to have a bit of extra info on the version string (full version: 1.2.1-a, therefore corroborating this issue's claim that the added info (normally considered "pre-release") is breaking install/fetch:

$ helm search -r traefik
NAME            VERSION DESCRIPTION
stable/traefik  1.2.1-a A Traefik based Kubernetes ingress controller w...

$ helm fetch stable/traefik
Error: chart "traefik" not found in stable index. (try 'helm repo update'). No chart version found for traefik-

Caveat

However, it is important to note (and maybe useful in debugging/pinpointing the issue), if the "pre-release" chart version is explicitly specified, it can be installed/fetched with no issue. Continuing from above:

$ helm fetch stable/traefik --version 1.2.1-a

$ ls
traefik-1.2.1-a.tgz

Most helpful comment

The reason is that Traefik's version is, according to SemVer, a pre-release. In Helm 2.4.1, we decided to not install pre-releases unless explicitly given a version. #2279

The work-around is to run something that allows pre-releases to satisfy the range criteria: helm fetch stable/traefik --debug --version=">1.0.0-a"

@vdice suggested to me that we maybe add a flag to allow unstable packages to satisfy the request. We're thinking maybe --devel

All 3 comments

The reason is that Traefik's version is, according to SemVer, a pre-release. In Helm 2.4.1, we decided to not install pre-releases unless explicitly given a version. #2279

The work-around is to run something that allows pre-releases to satisfy the range criteria: helm fetch stable/traefik --debug --version=">1.0.0-a"

@vdice suggested to me that we maybe add a flag to allow unstable packages to satisfy the request. We're thinking maybe --devel

@vdice suggested to me that we maybe add a flag to allow unstable packages to satisfy the request.

Indeed, one use case of ours is to devote entire chart repos to _only_ 'unstable/dev/pre-release' versioned charts. This has the benefit of not 'crowding' our 'official' chart repos that contain official versions only.

It would be handy to maintain the ability to pull the latest chart from said dev repo(s) without specifying any version or version range (as could be done in helm pre-2.4.x): helm install dev-chart-repo/dev-chart, instead of having to keep track of the latest dev-chart version somehow and supplying the proper range via --version.

If a --devel flag is needed to do the aforementioned, that would be fine.

While I can understand (somewhat) the rationale behind refusing to install "pre-release" charts, I can't see how that is of any use with fetch.

Furthermore, the current error message is misleading and causes time waste.

Was this page helpful?
0 / 5 - 0 ratings