Repository: GoogleContainerTools/skaffold
Pull request #8865 (2023-06-08 12:57:46)

chore: bump peter-evans/create-or-update-comment from 3.0.1 to 3.0.2
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 3.0.1 to 3.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/peter-evans/create-or-update-comment/releases">peter-evans/create-or-update-comment's releases</a>.</em></p>
<blockquote>
<h2>Create or Update Comment v3.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Truncate long comment bodies during comment update too by <a href="https://github.com/Dermah"><code>@​Dermah</code></a> in <a href="https://redirect.github.com/peter-evans/create-or-update-comment/pull/205">peter-evans/create-or-update-comment#205</a></li>
<li>Update distribution by <a href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in <a href="https://redirect.github.com/peter-evans/create-or-update-comment/pull/210">peter-evans/create-or-update-comment#210</a></li>
<li>23 dependency updates by <a href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Dermah"><code>@​Dermah</code></a> made their first contribution in <a href="https://redirect.github.com/peter-evans/create-or-update-comment/pull/205">peter-evans/create-or-update-comment#205</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/peter-evans/create-or-update-comment/compare/v3.0.1...v3.0.2">https://github.com/peter-evans/create-or-update-comment/compare/v3.0.1...v3.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/c6c9a1a66007646a28c153e2a8580a5bad27bcfa"><code>c6c9a1a</code></a> Update distribution (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/210">#210</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/ce3fa353c4b456c533f86e14c3343f301d2fe5ed"><code>ce3fa35</code></a> fix: truncate long comment bodies during comment update too (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/205">#205</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/5825e577e369343190925b317e13e821c7993725"><code>5825e57</code></a> Bump eslint from 8.41.0 to 8.42.0 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/209">#209</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/507508615ae00f3329ff2ab18f528a647a2b330e"><code>5075086</code></a> Bump <code>@​typescript-eslint/parser</code> from 5.59.8 to 5.59.9 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/208">#208</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/33041066d94dc85c0d9e16531ee36b8b32bfdb4b"><code>3304106</code></a> Bump <code>@​typescript-eslint/eslint-plugin</code> from 5.59.8 to 5.59.9 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/207">#207</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/84d3b3509737d8ac885a7d1a4a7b9135da61aed0"><code>84d3b35</code></a> Bump eslint-plugin-github from 4.7.0 to 4.8.0 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/206">#206</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/542d5c2467125bf0a74bd75f1ec2cf9b7eda44bb"><code>542d5c2</code></a> Bump <code>@​typescript-eslint/eslint-plugin</code> from 5.59.7 to 5.59.8 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/203">#203</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/580d37cf7c654133aa5a8cf5e5999a11ae6bef30"><code>580d37c</code></a> Bump <code>@​typescript-eslint/parser</code> from 5.59.7 to 5.59.8 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/204">#204</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/f8a0c20f6940378149e03b1d508b907c9f4b5b24"><code>f8a0c20</code></a> Bump <code>@​types/node</code> from 18.16.14 to 18.16.16 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/202">#202</a>)</li>
<li><a href="https://github.com/peter-evans/create-or-update-comment/commit/6534843181fc2aeb7f9f1cd3cd4a7b956cada2db"><code>6534843</code></a> Bump <code>@​typescript-eslint/eslint-plugin</code> from 5.59.6 to 5.59.7 (<a href="https://redirect.github.com/peter-evans/create-or-update-comment/issues/201">#201</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/peter-evans/create-or-update-comment/compare/ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b...c6c9a1a66007646a28c153e2a8580a5bad27bcfa">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-or-update-comment&package-manager=github_actions&previous-version=3.0.1&new-version=3.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/performance-comparison-label.yml b/.github/workflows/performance-comparison-label.yml
index afe85c76e..087805d9e 100644
--- a/.github/workflows/performance-comparison-label.yml
+++ b/.github/workflows/performance-comparison-label.yml
@@ -38,7 +38,7 @@ jobs:
         echo "body=$body" >> $GITHUB_OUTPUT
     
     - name: Create comment
-      uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b
+      uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
       with:
         issue-number: ${{ github.event.pull_request.number }}
         body: "${{ steps.parse-comment-template-into-gh-output.outputs.body }}"
diff --git a/.github/workflows/performance-comparison.yml b/.github/workflows/performance-comparison.yml
index 4c01c634f..98d5a97b5 100644
--- a/.github/workflows/performance-comparison.yml
+++ b/.github/workflows/performance-comparison.yml
@@ -33,7 +33,7 @@ jobs:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
     - name: Add reaction
-      uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b
+      uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
       with:
         comment-id: ${{ github.event.comment.id }}
         reactions: rocket
@@ -123,7 +123,7 @@ jobs:
         echo "body=$body" >> $GITHUB_OUTPUT
 
     - name: Create comment
-      uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b
+      uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
       with:
         issue-number: ${{ github.event.issue.number }}
         body: "${{ steps.run-performance-comparison-benchmarks.outputs.body }}"
diff --git a/pkg/skaffold/deploy/helm/helm.go b/pkg/skaffold/deploy/helm/helm.go
index 7bf79f47c..d2f7e5b54 100644
--- a/pkg/skaffold/deploy/helm/helm.go
+++ b/pkg/skaffold/deploy/helm/helm.go
@@ -438,17 +438,19 @@ func (h *Deployer) deployRelease(ctx context.Context, out io.Writer, releaseName
 	}
 
 	installEnv := util.OSEnviron()
-	if len(builds) > 0 {
-		skaffoldBinary, filterEnv, cleanup, err := helm.PrepareSkaffoldFilter(h, builds)
-		if err != nil {
-			return nil, nil, fmt.Errorf("could not prepare `skaffold filter`: %w", err)
-		}
 
-		// need to include current environment, specifically for HOME to lookup ~/.kube/config
-		installEnv = append(installEnv, filterEnv...)
-		opts.postRenderer = skaffoldBinary
+	skaffoldBinary, filterEnv, cleanup, err := helm.PrepareSkaffoldFilter(h, builds)
+	if err != nil {
+		return nil, nil, fmt.Errorf("could not prepare `skaffold filter`: %w", err)
+	}
+
+	if cleanup != nil {
 		defer cleanup()
 	}
+	// need to include current environment, specifically for HOME to lookup ~/.kube/config
+	installEnv = append(installEnv, filterEnv...)
+	opts.postRenderer = skaffoldBinary
+
 	opts.namespace, err = helm.ReleaseNamespace(h.namespace, r)
 	if err != nil {
 		return nil, nil, err


Test patch:
diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go
index 702984d7c..99eab8a3f 100644
--- a/pkg/skaffold/deploy/helm/helm_test.go
+++ b/pkg/skaffold/deploy/helm/helm_test.go
@@ -634,8 +634,8 @@ func TestHelmDeploy(t *testing.T) {
 			commands: testutil.
 				CmdRunWithOutput("helm version --client", version31).
 				AndRunErr("helm --kube-context kubecontext get all skaffold-helm-remote --kubeconfig kubeconfig", fmt.Errorf("Error: release: not found")).
-				AndRunEnv("helm --kube-context kubecontext install skaffold-helm-remote stable/chartmuseum --repo https://charts.helm.sh/stable --kubeconfig kubeconfig",
-					[]string{"SKAFFOLD_FILENAME", "SKAFFOLD_CMDLINE"}).
+				AndRunEnv("helm --kube-context kubecontext install skaffold-helm-remote stable/chartmuseum --post-renderer SKAFFOLD-BINARY --repo https://charts.helm.sh/stable --kubeconfig kubeconfig",
+					[]string{"SKAFFOLD_FILENAME=test.yaml", "SKAFFOLD_CMDLINE=filter --kube-context kubecontext --kubeconfig kubeconfig"}).
 				AndRunWithOutput("helm --kube-context kubecontext get all skaffold-helm-remote --template {{.Release.Manifest}} --kubeconfig kubeconfig", validDeployYaml),
 			helm:               testDeployRemoteChart,
 			expectedNamespaces: []string{""},
@@ -645,8 +645,8 @@ func TestHelmDeploy(t *testing.T) {
 			commands: testutil.
 				CmdRunWithOutput("helm version --client", version31).
 				AndRunErr("helm --kube-context kubecontext get all skaffold-helm-remote --kubeconfig kubeconfig", fmt.Errorf("Error: release: not found")).
-				AndRunEnv("helm --kube-context kubecontext install skaffold-helm-remote --version 1.0.0 stable/chartmuseum --repo https://charts.helm.sh/stable --kubeconfig kubeconfig",
-					[]string{"SKAFFOLD_FILENAME", "SKAFFOLD_CMDLINE"}).
+				AndRunEnv("helm --kube-context kubecontext install skaffold-helm-remote --version 1.0.0 stable/chartmuseum --post-renderer SKAFFOLD-BINARY --repo https://charts.helm.sh/stable --kubeconfig kubeconfig",
+					[]string{"SKAFFOLD_FILENAME=test.yaml", "SKAFFOLD_CMDLINE=filter --kube-context kubecontext --kubeconfig kubeconfig"}).
 				AndRunWithOutput("helm --kube-context kubecontext get all skaffold-helm-remote --template {{.Release.Manifest}} --kubeconfig kubeconfig", validDeployYaml),
 			helm:               testDeployRemoteChartVersion,
 			expectedNamespaces: []string{""},
@@ -656,7 +656,7 @@ func TestHelmDeploy(t *testing.T) {
 			commands: testutil.
 				CmdRunWithOutput("helm version --client", version31).
 				AndRunErr("helm --kube-context kubecontext get all skaffold-helm-remote --kubeconfig kubeconfig", fmt.Errorf("Error: release: not found")).
-				AndRunErr("helm --kube-context kubecontext install skaffold-helm-remote stable/chartmuseum --repo https://charts.helm.sh/stable --kubeconfig kubeconfig", fmt.Errorf("building helm dependencies")),
+				AndRunErr("helm --kube-context kubecontext install skaffold-helm-remote stable/chartmuseum --post-renderer SKAFFOLD-BINARY --repo https://charts.helm.sh/stable --kubeconfig kubeconfig", fmt.Errorf("building helm dependencies")),
 			helm:               testDeployRemoteChart,
 			shouldErr:          true,
 			expectedNamespaces: []string{""},