Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Large integer image tag gets converted to scientific notation #102

Open
Kiougar opened this issue Jun 12, 2019 · 8 comments
Open

Large integer image tag gets converted to scientific notation #102

Kiougar opened this issue Jun 12, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@Kiougar
Copy link

Kiougar commented Jun 12, 2019

When an image tag is a large integer (e.g. 20190612073634) it gets converted to the scientific notation (e.g 2.0190612073634e+13)

For example the following release configuration:

Values:
  Image:
    Repository:  [...]
    Tag:         20190612073634

Results in this pod configuration:

Containers:
  app:
    Container ID:
    Image:          [...]:2.0190612073634e+13

As a result, the pod is at InvalidImageName error state

@osdrv osdrv added the bug Something isn't working label Jun 12, 2019
@karuppiah7890
Copy link

@Kiougar You can enclose the value in quotes or double quotes to stop this.

Tag: '20190612073634'

@Kiougar
Copy link
Author

Kiougar commented Jun 23, 2019

@karuppiah7890 thanks for the suggestion! What I'm currently doing is this instead:

Tag: v20190612073634

However, I still think the original issue is a bug and needs to be fixed.

@jan25
Copy link

jan25 commented Jun 28, 2019

This is a problem originating deep down in dependency chain inside core yaml library: https://github.com/ghodss/yaml. Refer to this comment in helm based on their investigation.

@osdrv
Copy link
Contributor

osdrv commented Jul 11, 2019

We made some little progress on this problem and opened a corresponding PR: helm/helm#6010. If this change will appear in helm branch 2, we will be able to bump Shipper helm dependency version and fix the problem around version 0.6–0.7. Will keep this thread posted.

@osdrv osdrv self-assigned this Jul 30, 2019
osdrv pushed a commit that referenced this issue Oct 16, 2019
This commit initializes our transition to the updated version of Helm
(2.15+) which should solve our old issue with yaml convering digit-only
docker image tags to scientific notation and breaks it all around.

The commit that fixes it was merged into helm v2 in version 2.15.0:
helm/helm@9014bd9

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
@osdrv
Copy link
Contributor

osdrv commented Oct 23, 2019

A quick update on the issue: the fix is not coming any time soon.

The change caused a major regression in numeric functions (see helm/helm#6708 for more details). Our attempt to close the breach turned into an unreasonably massive and ugly change helm/helm#6709, which didn't look like a small fix at all. Taking into consideration potential risks, the fixing PR has been closed with no merge and the initial change reverted. There is a possibility the problem would be fixed in the future versions of Helm3 (the idea is to use reflect-based function overloads; we've made some initial progress here: https://github.com/icanhazbroccoli/helm@8b359af, but it's not close to anything working yet). My apologies for being over-optimistic and wasting so much time on it.

@osdrv
Copy link
Contributor

osdrv commented Nov 6, 2019

A new hope to get this fixed comes with this PR: helm/helm#6888. I also created another issue #228 as if the PR gets merged into Helm upstream, we will have to upgrade straight to helm 3. No ETA on getting this fixed yet. Keeping it open for now.

@harrysingh
Copy link

@osdrv What is latest state of the fix around this?

@osdrv
Copy link
Contributor

osdrv commented Feb 16, 2021

Hey @harrysingh, after a few attempts to fix the issue the fix was not accepted by Helm folks: in the end it looked reflect-monstrous, I admit. Neither me nor the team can make any promises about the fix ever landing in Helm. In the meantime I'd suggest following the workarounds proposed in the corresponding Helm issue ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants