Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install/fetch latest chart if 'pre-release' version #2407

Closed
vdice opened this issue May 5, 2017 · 3 comments
Closed

Cannot install/fetch latest chart if 'pre-release' version #2407

vdice opened this issue May 5, 2017 · 3 comments

Comments

@vdice
Copy link
Member

vdice commented May 5, 2017

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

helm/charts#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
@technosophos
Copy link
Member

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
Copy link
Member Author

vdice commented May 5, 2017

@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.

technosophos added a commit to technosophos/k8s-helm that referenced this issue May 5, 2017
2.4.0 stopped installing development versions by default. This allows
the user to re-enable that support by setting --devel.

Closes helm#2407
technosophos added a commit to technosophos/k8s-helm that referenced this issue May 17, 2017
2.4.0 stopped installing development versions by default. This allows
the user to re-enable that support by setting --devel.

Closes helm#2407
technosophos added a commit to technosophos/k8s-helm that referenced this issue May 17, 2017
2.4.0 stopped installing development versions by default. This allows
the user to re-enable that support by setting --devel.

Closes helm#2407
technosophos added a commit to technosophos/k8s-helm that referenced this issue May 17, 2017
2.4.0 stopped installing development versions by default. This allows
the user to re-enable that support by setting --devel.

Closes helm#2407
technosophos added a commit that referenced this issue May 17, 2017
2.4.0 stopped installing development versions by default. This allows
the user to re-enable that support by setting --devel.

Closes #2407
flynnduism pushed a commit to flynnduism/helm that referenced this issue May 28, 2017
2.4.0 stopped installing development versions by default. This allows
the user to re-enable that support by setting --devel.

Closes helm#2407
@marcelloromani
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants