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

Helm is converting my git tag to exponential form #1643

Closed
colemickens opened this issue Dec 6, 2016 · 8 comments
Closed

Helm is converting my git tag to exponential form #1643

colemickens opened this issue Dec 6, 2016 · 8 comments

Comments

@colemickens
Copy link

I use a git short commit hash as my docker tag. I pass it to helm install as a --set parameter.

$ git describe --always = 58467965

helm install ./polykube --set image.registry="colemickpoly58467965-microsoft.azurecr.io",image.tag="58467965",nameOverride="polykube",image.username="xyz",image.password="abc"

Unfortunately, it's rendered out in exponential form:

failed to "StartContainer" for "aspnet-nginx" with ErrImagePull: "couldn't parse image reference \"colemickpoly58467965-microsoft.azurecr.io/polykube-aspnet-api-nginx:5.8467965e+07\": invalid reference format"

Image: colemickpoly58467965-microsoft.azurecr.io/polykube-aspnet-api-nginx:5.8467965e+07

Suspected as related: #1451 (cc: @michelleN)

@colemickens
Copy link
Author

It seems to happen even when the git commit short hash has the alpha hex characters in it. I suspect this was only working for me for a while since I was actually using git describe --always --dirty and my workspace was in progress and thus the git commit hash was actually c573904-dirty and didn't get parsed as an int.

colemickens added a commit to colemickens/polykube that referenced this issue Dec 6, 2016
@databus23
Copy link
Contributor

I think this is the same as #1558.
This should have been fixed with: #1576 which is in 2.0.1.
What version of helm are you running?

@colemickens
Copy link
Author

I was on 2.0.0. I'll try with 2.0.1 this evening.

@colemickens
Copy link
Author

Haven't repro'd it yet on 2.0.1 or 2.0.2. Closing this.

@borekb
Copy link

borekb commented Aug 18, 2017

We're seeing this in Helm 2.5.0, for example, $ helm upgrade --set image.tag="9275389" produces image tag 9.275389e+06.

$ helm version
Client: &version.Version{SemVer:"v2.5.0", GitCommit:"012cb0ac1a1b2f888144ef5a67b8dab6c2d45be6", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.5.0", GitCommit:"012cb0ac1a1b2f888144ef5a67b8dab6c2d45be6", GitTreeState:"clean"}

@rdpa
Copy link

rdpa commented Sep 21, 2017

Also seeing this in helm 2.6.1

$ helm version
Client: &version.Version{SemVer:"v2.6.1", GitCommit:"bbc1f71dc03afc5f00c6ac84b9308f8ecb4f39ac", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.6.1", GitCommit:"bbc1f71dc03afc5f00c6ac84b9308f8ecb4f39ac", GitTreeState:"clean"}

@holybit
Copy link

holybit commented Oct 5, 2017

Can we re-open this issue? It's not fixed.

In my case, seeing this below on --set image.tag=5997578:

$ kubetctl describe po msj-treasure-map-msj-treasure-map-192172122-dnb80
...
Events:
  Type     Reason         Age               From                                    Message
  ----     ------         ----              ----                                    -------
  Normal   Scheduled      1m                default-scheduler                       Successfully assigned msj-treasure-map-msj-treasure-map-192172122-dnb80 to ip-10-253-13-113.ec2.internal
  Warning  InspectFailed  15s (x9 over 1m)  kubelet, ip-10-253-13-113.ec2.internal  Failed to apply default image tag "596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-uwsgi:5.997578e+06": couldn't parse image reference "596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-uwsgi:5.997578e+06": invalid reference format
  Warning  InspectFailed  15s (x9 over 1m)  kubelet, ip-10-253-13-113.ec2.internal  Failed to apply default image tag "596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-nginx:5.997578e+06": couldn't parse image reference "596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-nginx:5.997578e+06": invalid reference format
  Warning  FailedSync     15s (x9 over 1m)  kubelet, ip-10-253-13-113.ec2.internal  Error syncing pod, skipping: [failed to "StartContainer" for "msj-treasure-map-uwsgi" with InvalidImageName: "Failed to apply default image tag \"596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-uwsgi:5.997578e+06\": couldn't parse image reference \"596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-uwsgi:5.997578e+06\": invalid reference format"
, failed to "StartContainer" for "msj-treasure-map-nginx" with InvalidImageName: "Failed to apply default image tag \"596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-nginx:5.997578e+06\": couldn't parse image reference \"596297932419.dkr.ecr.us-east-1.amazonaws.com/msj-trmap-nginx:5.997578e+06\": invalid reference format"
$ helm version                                                                                                                                                                             
Client: &version.Version{SemVer:"v2.5.1", GitCommit:"7cf31e8d9a026287041bae077b09165be247ae66", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.5.1", GitCommit:"7cf31e8d9a026287041bae077b09165be247ae66", GitTreeState:"clean"}

@bacongobbler
Copy link
Member

Hey @holybit! #1707 tracks the issue where --set parses integers as scientific notation. Would you mind tacking on your comment there? Thanks!

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

7 participants