Skip to content

Reference template parsing order is non-deterministic #7701

Closed

Description

@asenci

Reference template parsing order is non-deterministic, causing tpl function to render the wrong value in certain situations.

Output of helm version:

version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2+k3s1", GitCommit:"cdab19b09a84389ffbf57bebd33871c60b1d6b28", GitTreeState:"clean", BuildDate:"2020-01-27T18:09:26Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

k3s

Minimal code to reproduce the issue:

chart.zip

$ unzip chart.zip
$ for i in $(seq 0 99); do helm template test01 parent >> results.txt; done
$ grep 'childName: test01-child' results.txt | wc -l
$ grep 'childName: test01-parent' results.txt | wc -l

I am seeing an average split of 80/20% between the values.

PR to come.

Activity

  1. added
    bug
    on Feb 28, 2020
  2. asenci commented on Apr 21, 2020

    @asenci
    ContributorAuthor

    Fixed by PR #7702

  3. added a commit that references this issue on May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions