Repository: helm/helm
Pull request #8042 (2020-05-01 20:23:43)

bump version to v3.3
**What this PR does / why we need it**:

The master branch still had version 3.1 for the helm binary.

**Special notes for your reviewer**:

I assume that since 3.2 is released, master should show 3.3.


marckhouzam: Where is the doc describing how to perform a release?
I would like to see if changing the version is mentioned before creating the release branch.
mattfarina: The release checklist can be found at https://helm.sh/docs/community/release_checklist/. The change to v3.2 should be pulled to master. See [this](https://helm.sh/docs/community/release_checklist/#2-change-the-version-number-in-git). Looks like we missed a step.

@bacongobbler do you know why master isn't on v3.3 instead of needing to be v3.2 as the docs say?
bacongobbler: It's all for issue triage. Way back in early Helm days, we had clients running varying versions of Helm with their own custom patches on top of stable Helm releases. It was much quicker at a glance to determine that if the version output was `3.2+unreleased`, they were using Helm 3.2 as their base branch, and we could try to reproduce their issue using Helm 3.2. If the issue could not be reproduced, then it was likely something to do with their patchset.

Either 3.2 or 3.3 works. If we're following the same pattern as Helm 2, 3.2 should be the correct version number.
marckhouzam: If it is more helpful to have the same version on master as the latest release, then I'll update my patch.

With that in mind, would it be a reasonable idea to update the release process to first change the version and then create the release branch?  This would avoid having to cherry-pick the version change (and sometimes forgetting 😄 ).
marckhouzam: This new commit is a cherry-pick of from the release branch

Patch:
diff --git a/internal/version/version.go b/internal/version/version.go
index fd0616920..baa65a028 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -30,7 +30,7 @@ var (
 	// Increment major number for new feature additions and behavioral changes.
 	// Increment minor number for bug fixes and performance enhancements.
 	// Increment patch number for critical fixes to existing releases.
-	version = "v3.1"
+	version = "v3.2"
 
 	// metadata is extra build time data
 	metadata = ""
diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go
index b76e4260a..787c5b26a 100644
--- a/pkg/lint/rules/template.go
+++ b/pkg/lint/rules/template.go
@@ -81,7 +81,6 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace
 		return
 	}
 	var e engine.Engine
-	e.Strict = strict
 	e.LintMode = true
 	renderedContentMap, err := e.Render(chart, valuesToRender)
 


Test patch:
diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/cmd/helm/testdata/output/version-client-shorthand.txt
index 8f9ed6136..d613309fe 100644
--- a/cmd/helm/testdata/output/version-client-shorthand.txt
+++ b/cmd/helm/testdata/output/version-client-shorthand.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.1", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.2", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-client.txt b/cmd/helm/testdata/output/version-client.txt
index 8f9ed6136..d613309fe 100644
--- a/cmd/helm/testdata/output/version-client.txt
+++ b/cmd/helm/testdata/output/version-client.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.1", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.2", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/cmd/helm/testdata/output/version-short.txt b/cmd/helm/testdata/output/version-short.txt
index 861668947..4d5034cea 100644
--- a/cmd/helm/testdata/output/version-short.txt
+++ b/cmd/helm/testdata/output/version-short.txt
@@ -1,1 +1,1 @@
-v3.1
+v3.2
diff --git a/cmd/helm/testdata/output/version-template.txt b/cmd/helm/testdata/output/version-template.txt
index e5a779bbf..7c09e8d57 100644
--- a/cmd/helm/testdata/output/version-template.txt
+++ b/cmd/helm/testdata/output/version-template.txt
@@ -1,1 +1,1 @@
-Version: v3.1
\ No newline at end of file
+Version: v3.2
\ No newline at end of file
diff --git a/cmd/helm/testdata/output/version.txt b/cmd/helm/testdata/output/version.txt
index 8f9ed6136..d613309fe 100644
--- a/cmd/helm/testdata/output/version.txt
+++ b/cmd/helm/testdata/output/version.txt
@@ -1,1 +1,1 @@
-version.BuildInfo{Version:"v3.1", GitCommit:"", GitTreeState:"", GoVersion:""}
+version.BuildInfo{Version:"v3.2", GitCommit:"", GitTreeState:"", GoVersion:""}
diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go
index 1a047edf2..991c6c2f6 100644
--- a/pkg/lint/rules/template_test.go
+++ b/pkg/lint/rules/template_test.go
@@ -174,3 +174,55 @@ func TestDeprecatedAPIFails(t *testing.T) {
 		t.Errorf("Surprised to learn that %q is deprecated", err.Deprecated)
 	}
 }
+
+const manifest = `apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: foo
+data:
+  myval1: {{default "val" .Values.mymap.key1 }}
+  myval2: {{default "val" .Values.mymap.key2 }}
+`
+
+// TestSTrictTemplatePrasingMapError is a regression test.
+//
+// The template engine should not produce an error when a map in values.yaml does
+// not contain all possible keys.
+//
+// See https://github.com/helm/helm/issues/7483
+func TestStrictTemplateParsingMapError(t *testing.T) {
+
+	ch := chart.Chart{
+		Metadata: &chart.Metadata{
+			Name:       "regression7483",
+			APIVersion: "v2",
+			Version:    "0.1.0",
+		},
+		Values: map[string]interface{}{
+			"mymap": map[string]string{
+				"key1": "val1",
+			},
+		},
+		Templates: []*chart.File{
+			{
+				Name: "templates/configmap.yaml",
+				Data: []byte(manifest),
+			},
+		},
+	}
+	dir := ensure.TempDir(t)
+	defer os.RemoveAll(dir)
+	if err := chartutil.SaveDir(&ch, dir); err != nil {
+		t.Fatal(err)
+	}
+	linter := &support.Linter{
+		ChartDir: filepath.Join(dir, ch.Metadata.Name),
+	}
+	Templates(linter, ch.Values, namespace, strict)
+	if len(linter.Messages) != 0 {
+		t.Errorf("expected zero messages, got %d", len(linter.Messages))
+		for i, msg := range linter.Messages {
+			t.Logf("Message %d: %q", i, msg)
+		}
+	}
+}