Repository: GoogleContainerTools/skaffold
Pull request #8046 (2022-11-05 19:51:06)

fix: use std lib signal handling
<!-- Thank you for your contribution! -->

<!-- Include if applicable: -->
Fixes: #nnn <!-- tracking issues that this PR will close -->
**Related**: _Relevant tracking issues, for context_
**Merge before/after**: _Dependent or prerequisite PRs_

**Description**
<!-- Describe your changes here. The more detail, the easier the review! -->
use default signal package over custom code and delete tests

**User facing changes (remove if N/A)**
<!-- Describe any user facing changes this PR introduces. -->
<!-- "Before" and "After" sections work great - bonus points for screenshots! -->
<!-- Be sure all docs have been updated as well! -->

**Follow-up Work (remove if N/A)**
<!-- Mention any related follow up work to this PR. -->


<!--
Please be sure your PR includes unit tests - we don't merge code that brings down test coverage! 
Integration tests are sometimes an appropriate substitute. 
-->


conventional-commit-lint-gcf[bot]: <!-- probot comment [19673046]-->
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use `automerge` label. Good luck human!

 -- conventional-commit-lint bot
https://conventionalcommits.org/

Patch:
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 008085ac7..d42c8b91c 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -39,8 +39,8 @@ jobs:
     # <https://markphelps.me/posts/speed-up-your-go-builds-with-actions-cache/>
     - id: go-cache-paths
       run: |
-        echo "::set-output name=go-build::$(go env GOCACHE)"
-        echo "::set-output name=go-mod::$(go env GOMODCACHE)"
+        echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
+        echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
 
     - uses: actions/cache@v3
       with:
diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml
index d40243aa2..7c1e372de 100644
--- a/.github/workflows/draft-release.yml
+++ b/.github/workflows/draft-release.yml
@@ -34,7 +34,7 @@ jobs:
       id: check-commit-message
       if: steps.regex-match.outputs.group1 != ''
       run: |
-        echo "::set-output name=applicable::true"
+        echo "applicable=true" >> $GITHUB_OUTPUT
         echo "This is a release commit: ${{ steps.regex-match.outputs.group1 }}"
     outputs:
       applicable: ${{ steps.check-commit-message.outputs.applicable }}
diff --git a/.github/workflows/integration-darwin.yml b/.github/workflows/integration-darwin.yml
index 3bfb62baa..ceb3f1769 100644
--- a/.github/workflows/integration-darwin.yml
+++ b/.github/workflows/integration-darwin.yml
@@ -31,8 +31,8 @@ jobs:
     # <https://markphelps.me/posts/speed-up-your-go-builds-with-actions-cache/>
     - id: go-cache-paths
       run: |
-        echo "::set-output name=go-build::$(go env GOCACHE)"
-        echo "::set-output name=go-mod::$(go env GOMODCACHE)"
+        echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
+        echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
 
     - uses: actions/cache@v3
       with:
diff --git a/.github/workflows/integration-linux.yml b/.github/workflows/integration-linux.yml
index b2d73c301..4913ea9a1 100644
--- a/.github/workflows/integration-linux.yml
+++ b/.github/workflows/integration-linux.yml
@@ -39,8 +39,8 @@ jobs:
     # <https://markphelps.me/posts/speed-up-your-go-builds-with-actions-cache/>
     - id: go-cache-paths
       run: |
-        echo "::set-output name=go-build::$(go env GOCACHE)"
-        echo "::set-output name=go-mod::$(go env GOMODCACHE)"
+        echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
+        echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
 
     - uses: actions/cache@v3
       with:
diff --git a/.github/workflows/integration-windows.yml b/.github/workflows/integration-windows.yml
index 951264af8..33647a051 100644
--- a/.github/workflows/integration-windows.yml
+++ b/.github/workflows/integration-windows.yml
@@ -31,8 +31,9 @@ jobs:
     # <https://markphelps.me/posts/speed-up-your-go-builds-with-actions-cache/>
     - id: go-cache-paths
       run: |
-        echo "::set-output name=go-build::$(go env GOCACHE)"
-        echo "::set-output name=go-mod::$(go env GOMODCACHE)"
+        echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
+        echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
+      shell: bash
 
     - uses: actions/cache@v3
       with:
diff --git a/.github/workflows/performance-comparison-label.yml b/.github/workflows/performance-comparison-label.yml
index 0bce6477f..069bcb58b 100644
--- a/.github/workflows/performance-comparison-label.yml
+++ b/.github/workflows/performance-comparison-label.yml
@@ -35,7 +35,7 @@ jobs:
         body="${body//'%'/'%25'}"
         body="${body//$'\n'/'%0A'}"
         body="${body//$'\r'/'%0D'}" 
-        echo ::set-output name=body::$body
+        echo "body=$body" >> $GITHUB_OUTPUT
     
     - name: Create comment
       uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808
diff --git a/.github/workflows/performance-comparison.yml b/.github/workflows/performance-comparison.yml
index dd0ead9fa..b9ca3aeff 100644
--- a/.github/workflows/performance-comparison.yml
+++ b/.github/workflows/performance-comparison.yml
@@ -120,7 +120,7 @@ jobs:
         body="${body//'%'/'%25'}"
         body="${body//$'\n'/'%0A'}"
         body="${body//$'\r'/'%0D'}" 
-        echo ::set-output name=body::$body
+        echo "body=$body" >> $GITHUB_OUTPUT
 
     - name: Create comment
       uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808
diff --git a/cmd/skaffold/app/cmd/dev.go b/cmd/skaffold/app/cmd/dev.go
index 3ddf15dad..bfdb9f568 100644
--- a/cmd/skaffold/app/cmd/dev.go
+++ b/cmd/skaffold/app/cmd/dev.go
@@ -71,11 +71,9 @@ func runDev(ctx context.Context, out io.Writer) error {
 				err := r.Dev(ctx, out, artifacts)
 				manifestListByConfig := r.DeployManifests()
 
-				if manifestListByConfig.String() != "" {
-					cleanup = func() {
-						if err := r.Cleanup(context.Background(), out, false, manifestListByConfig); err != nil {
-							log.Entry(ctx).Warn("deployer cleanup:", err)
-						}
+				cleanup = func() {
+					if err := r.Cleanup(context.Background(), out, false, manifestListByConfig); err != nil {
+						log.Entry(ctx).Warn("deployer cleanup:", err)
 					}
 				}
 
diff --git a/cmd/skaffold/app/signals.go b/cmd/skaffold/app/signals.go
deleted file mode 100644
index d06c90c8b..000000000
--- a/cmd/skaffold/app/signals.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright 2019 The Skaffold Authors
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package app
-
-import (
-	"context"
-	"os"
-	"os/signal"
-	"syscall"
-)
-
-func catchCtrlC(cancel context.CancelFunc) {
-	signals := make(chan os.Signal, 1)
-	signal.Notify(signals,
-		os.Interrupt,
-		syscall.SIGTERM,
-		syscall.SIGINT,
-		syscall.SIGPIPE,
-	)
-
-	go func() {
-		<-signals
-		signal.Stop(signals)
-		cancel()
-	}()
-}
diff --git a/cmd/skaffold/app/skaffold.go b/cmd/skaffold/app/skaffold.go
index 2b131d409..1941bb9c8 100644
--- a/cmd/skaffold/app/skaffold.go
+++ b/cmd/skaffold/app/skaffold.go
@@ -22,6 +22,8 @@ import (
 	"fmt"
 	"io"
 	"os"
+	"os/signal"
+	"syscall"
 
 	shell "github.com/kballard/go-shellquote"
 
@@ -31,11 +33,10 @@ import (
 )
 
 func Run(out, stderr io.Writer) error {
-	ctx, cancel := context.WithCancel(context.Background())
+	ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGINT, syscall.SIGPIPE)
 	defer cancel()
 
 	catchStackdumpRequests()
-	catchCtrlC(cancel)
 
 	c := cmd.NewSkaffoldCommand(out, stderr)
 	if cmdLine := os.Getenv("SKAFFOLD_CMDLINE"); cmdLine != "" && len(os.Args) == 1 {
diff --git a/examples/getting-started/Dockerfile b/examples/getting-started/Dockerfile
index 67f8c3cbb..def1b4458 100644
--- a/examples/getting-started/Dockerfile
+++ b/examples/getting-started/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.18 as builder
+FROM golang:1.19 as builder
 WORKDIR /code
 COPY main.go .
 COPY go.mod .
diff --git a/examples/getting-started/go.mod b/examples/getting-started/go.mod
index bc78b13a6..3a504b471 100644
--- a/examples/getting-started/go.mod
+++ b/examples/getting-started/go.mod
@@ -1,3 +1,3 @@
 module github.com/GoogleContainerTools/skaffold/examples/getting-started
 
-go 1.18
+go 1.19
diff --git a/examples/helm-deployment/skaffold.yaml b/examples/helm-deployment/skaffold.yaml
index 9d99949d2..17fbd4a42 100644
--- a/examples/helm-deployment/skaffold.yaml
+++ b/examples/helm-deployment/skaffold.yaml
@@ -3,7 +3,7 @@ kind: Config
 build:
   artifacts:
   - image: skaffold-helm
-manifests:
+deploy:
   helm:
     releases:
     - name: skaffold-helm
diff --git a/examples/helm-render/Dockerfile b/examples/helm-render/Dockerfile
new file mode 100644
index 000000000..c01cebfca
--- /dev/null
+++ b/examples/helm-render/Dockerfile
@@ -0,0 +1,14 @@
+FROM golang:1.18 as builder
+WORKDIR /code
+COPY main.go .
+COPY go.mod .
+# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
+ARG SKAFFOLD_GO_GCFLAGS
+RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -trimpath -o /app main.go
+
+FROM alpine:3.10
+# Define GOTRACEBACK to mark this container as using the Go language runtime
+# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
+ENV GOTRACEBACK=single
+CMD ["./app"]
+COPY --from=builder /app .
diff --git a/examples/helm-render/README.md b/examples/helm-render/README.md
new file mode 100644
index 000000000..faee1b643
--- /dev/null
+++ b/examples/helm-render/README.md
@@ -0,0 +1,39 @@
+### Example: deploy multiple releases with Helm
+
+[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/helm-deployment)
+
+You can deploy multiple releases with skaffold, each will need a chartPath, a values file, and namespace.
+Skaffold can inject intermediate build tags in the the values map in the skaffold.yaml.
+
+Let's walk through the skaffold yaml:
+
+We'll be building an image called `skaffold-helm`, and it's a dockerfile, so we'll add it to the artifacts.
+
+```yaml
+build:
+  artifacts:
+  - image: skaffold-helm
+```
+
+Now, we want to deploy this image with helm.
+We add a new release in the helm part of the deploy stanza.
+
+```yaml
+deploy:
+  helm:
+    releases:
+    - name: skaffold-helm
+      chartPath: charts
+      # namespace: skaffold
+      setValues:
+        image: skaffold-helm
+      valuesFiles:
+      - values.yaml
+```
+
+This part tells Skaffold to set the `image` parameter of the values file to the built `skaffold-helm` image and tag.
+
+```yaml
+      setValues:
+        image: skaffold-helm
+```
diff --git a/examples/helm-render/charts/Chart.yaml b/examples/helm-render/charts/Chart.yaml
new file mode 100644
index 000000000..82cbe036a
--- /dev/null
+++ b/examples/helm-render/charts/Chart.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Skaffold example with Helm
+name: skaffold-helm
+version: 0.1.0
diff --git a/examples/helm-render/charts/templates/deployment.yaml b/examples/helm-render/charts/templates/deployment.yaml
new file mode 100644
index 000000000..78207bf88
--- /dev/null
+++ b/examples/helm-render/charts/templates/deployment.yaml
@@ -0,0 +1,19 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    app: {{ .Chart.Name }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ .Chart.Name }}
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ .Chart.Name }}
+    spec:
+      containers:
+      - name: {{ .Chart.Name }}
+        image: {{ .Values.image }}
diff --git a/examples/helm-render/charts/values.yaml b/examples/helm-render/charts/values.yaml
new file mode 100644
index 000000000..b50415242
--- /dev/null
+++ b/examples/helm-render/charts/values.yaml
@@ -0,0 +1,5 @@
+# Default values for skaffold-helm.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+replicaCount: 2
+image: skaffold-helm:latest
diff --git a/examples/helm-render/go.mod b/examples/helm-render/go.mod
new file mode 100644
index 000000000..6d6d3ddc5
--- /dev/null
+++ b/examples/helm-render/go.mod
@@ -0,0 +1,3 @@
+module github.com/GoogleContainerTools/skaffold/examples/helm-deployment
+
+go 1.18
diff --git a/examples/helm-render/main.go b/examples/helm-render/main.go
new file mode 100644
index 000000000..8c3e45267
--- /dev/null
+++ b/examples/helm-render/main.go
@@ -0,0 +1,14 @@
+package main
+
+import (
+	"fmt"
+	"time"
+)
+
+func main() {
+	for counter := 0; ; counter++ {
+		fmt.Println("Hello world!", counter)
+
+		time.Sleep(time.Second * 1)
+	}
+}
diff --git a/examples/helm-render/skaffold.yaml b/examples/helm-render/skaffold.yaml
new file mode 100644
index 000000000..9d99949d2
--- /dev/null
+++ b/examples/helm-render/skaffold.yaml
@@ -0,0 +1,10 @@
+apiVersion: skaffold/v3
+kind: Config
+build:
+  artifacts:
+  - image: skaffold-helm
+manifests:
+  helm:
+    releases:
+    - name: skaffold-helm
+      chartPath: charts
diff --git a/integration/examples/helm-deployment/skaffold.yaml b/integration/examples/helm-deployment/skaffold.yaml
index 9edb3b5bf..a28799e9b 100644
--- a/integration/examples/helm-deployment/skaffold.yaml
+++ b/integration/examples/helm-deployment/skaffold.yaml
@@ -3,7 +3,7 @@ kind: Config
 build:
   artifacts:
   - image: skaffold-helm
-manifests:
+deploy:
   helm:
     releases:
     - name: skaffold-helm
diff --git a/integration/examples/helm-render/Dockerfile b/integration/examples/helm-render/Dockerfile
new file mode 100644
index 000000000..c01cebfca
--- /dev/null
+++ b/integration/examples/helm-render/Dockerfile
@@ -0,0 +1,14 @@
+FROM golang:1.18 as builder
+WORKDIR /code
+COPY main.go .
+COPY go.mod .
+# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
+ARG SKAFFOLD_GO_GCFLAGS
+RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -trimpath -o /app main.go
+
+FROM alpine:3.10
+# Define GOTRACEBACK to mark this container as using the Go language runtime
+# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
+ENV GOTRACEBACK=single
+CMD ["./app"]
+COPY --from=builder /app .
diff --git a/integration/examples/helm-render/README.md b/integration/examples/helm-render/README.md
new file mode 100644
index 000000000..faee1b643
--- /dev/null
+++ b/integration/examples/helm-render/README.md
@@ -0,0 +1,39 @@
+### Example: deploy multiple releases with Helm
+
+[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/helm-deployment)
+
+You can deploy multiple releases with skaffold, each will need a chartPath, a values file, and namespace.
+Skaffold can inject intermediate build tags in the the values map in the skaffold.yaml.
+
+Let's walk through the skaffold yaml:
+
+We'll be building an image called `skaffold-helm`, and it's a dockerfile, so we'll add it to the artifacts.
+
+```yaml
+build:
+  artifacts:
+  - image: skaffold-helm
+```
+
+Now, we want to deploy this image with helm.
+We add a new release in the helm part of the deploy stanza.
+
+```yaml
+deploy:
+  helm:
+    releases:
+    - name: skaffold-helm
+      chartPath: charts
+      # namespace: skaffold
+      setValues:
+        image: skaffold-helm
+      valuesFiles:
+      - values.yaml
+```
+
+This part tells Skaffold to set the `image` parameter of the values file to the built `skaffold-helm` image and tag.
+
+```yaml
+      setValues:
+        image: skaffold-helm
+```
diff --git a/integration/examples/helm-render/charts/Chart.yaml b/integration/examples/helm-render/charts/Chart.yaml
new file mode 100644
index 000000000..82cbe036a
--- /dev/null
+++ b/integration/examples/helm-render/charts/Chart.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Skaffold example with Helm
+name: skaffold-helm
+version: 0.1.0
diff --git a/integration/examples/helm-render/charts/templates/deployment.yaml b/integration/examples/helm-render/charts/templates/deployment.yaml
new file mode 100644
index 000000000..78207bf88
--- /dev/null
+++ b/integration/examples/helm-render/charts/templates/deployment.yaml
@@ -0,0 +1,19 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    app: {{ .Chart.Name }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ .Chart.Name }}
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ .Chart.Name }}
+    spec:
+      containers:
+      - name: {{ .Chart.Name }}
+        image: {{ .Values.image }}
diff --git a/integration/examples/helm-render/charts/values.yaml b/integration/examples/helm-render/charts/values.yaml
new file mode 100644
index 000000000..b50415242
--- /dev/null
+++ b/integration/examples/helm-render/charts/values.yaml
@@ -0,0 +1,5 @@
+# Default values for skaffold-helm.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+replicaCount: 2
+image: skaffold-helm:latest
diff --git a/integration/examples/helm-render/go.mod b/integration/examples/helm-render/go.mod
new file mode 100644
index 000000000..6d6d3ddc5
--- /dev/null
+++ b/integration/examples/helm-render/go.mod
@@ -0,0 +1,3 @@
+module github.com/GoogleContainerTools/skaffold/examples/helm-deployment
+
+go 1.18
diff --git a/integration/examples/helm-render/main.go b/integration/examples/helm-render/main.go
new file mode 100644
index 000000000..8c3e45267
--- /dev/null
+++ b/integration/examples/helm-render/main.go
@@ -0,0 +1,14 @@
+package main
+
+import (
+	"fmt"
+	"time"
+)
+
+func main() {
+	for counter := 0; ; counter++ {
+		fmt.Println("Hello world!", counter)
+
+		time.Sleep(time.Second * 1)
+	}
+}
diff --git a/integration/examples/helm-render/skaffold.yaml b/integration/examples/helm-render/skaffold.yaml
new file mode 100644
index 000000000..9edb3b5bf
--- /dev/null
+++ b/integration/examples/helm-render/skaffold.yaml
@@ -0,0 +1,10 @@
+apiVersion: skaffold/v4beta1
+kind: Config
+build:
+  artifacts:
+  - image: skaffold-helm
+manifests:
+  helm:
+    releases:
+    - name: skaffold-helm
+      chartPath: charts
diff --git a/integration/util.go b/integration/util.go
index 425b8783a..8d210e36e 100644
--- a/integration/util.go
+++ b/integration/util.go
@@ -430,6 +430,7 @@ func WaitForLogs(t *testing.T, out io.Reader, firstMessage string, moreMessages
 		case <-timer.C:
 			t.Fatal("timeout")
 		case line := <-lines:
+			t.Logf("Expecting %s, received %s \n", message, line)
 			if strings.Contains(line, message) {
 				if current >= len(moreMessages) {
 					return
diff --git a/pkg/skaffold/deploy/cloudrun/deploy.go b/pkg/skaffold/deploy/cloudrun/deploy.go
index 4cdcf11f8..c69f5008b 100644
--- a/pkg/skaffold/deploy/cloudrun/deploy.go
+++ b/pkg/skaffold/deploy/cloudrun/deploy.go
@@ -127,7 +127,7 @@ func (d *Deployer) GetSyncer() sync.Syncer {
 }
 
 // TrackBuildArtifacts is not supported by this deployer.
-func (d *Deployer) TrackBuildArtifacts([]graph.Artifact) {
+func (d *Deployer) TrackBuildArtifacts(_, _ []graph.Artifact) {
 
 }
 
diff --git a/pkg/skaffold/deploy/deploy.go b/pkg/skaffold/deploy/deploy.go
index f7db5afa3..cafcbaa5c 100644
--- a/pkg/skaffold/deploy/deploy.go
+++ b/pkg/skaffold/deploy/deploy.go
@@ -56,7 +56,7 @@ type Deployer interface {
 	GetSyncer() sync.Syncer
 
 	// TrackBuildArtifacts registers build artifacts to be tracked by a Deployer
-	TrackBuildArtifacts([]graph.Artifact)
+	TrackBuildArtifacts(builds, deployedImages []graph.Artifact)
 
 	// RegisterLocalImages tracks all local images to be loaded by the Deployer
 	RegisterLocalImages([]graph.Artifact)
diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go
index 580e8c7ac..46128022e 100644
--- a/pkg/skaffold/deploy/deploy_mux.go
+++ b/pkg/skaffold/deploy/deploy_mux.go
@@ -185,4 +185,4 @@ func (m DeployerMux) Cleanup(ctx context.Context, w io.Writer, dryRun bool, mani
 }
 
 // TrackBuildArtifacts should *only* be called on individual deployers. This is a noop.
-func (m DeployerMux) TrackBuildArtifacts(_ []graph.Artifact) {}
+func (m DeployerMux) TrackBuildArtifacts(_, _ []graph.Artifact) {}
diff --git a/pkg/skaffold/deploy/docker/deploy.go b/pkg/skaffold/deploy/docker/deploy.go
index 1435df268..ed0a5e12a 100644
--- a/pkg/skaffold/deploy/docker/deploy.go
+++ b/pkg/skaffold/deploy/docker/deploy.go
@@ -106,8 +106,8 @@ func NewDeployer(ctx context.Context, cfg dockerutil.Config, labeller *label.Def
 	}, nil
 }
 
-func (d *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) {
-	d.logger.RegisterArtifacts(artifacts)
+func (d *Deployer) TrackBuildArtifacts(builds, _ []graph.Artifact) {
+	d.logger.RegisterArtifacts(builds)
 }
 
 // TrackContainerFromBuild adds an artifact and its newly-associated container
@@ -133,7 +133,7 @@ func (d *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
 			return err
 		}
 	}
-	d.TrackBuildArtifacts(builds)
+	d.TrackBuildArtifacts(builds, nil)
 
 	return nil
 }
diff --git a/pkg/skaffold/deploy/helm/helm.go b/pkg/skaffold/deploy/helm/helm.go
index 2e12f7b3a..0a720ec49 100644
--- a/pkg/skaffold/deploy/helm/helm.go
+++ b/pkg/skaffold/deploy/helm/helm.go
@@ -218,9 +218,9 @@ func (h *Deployer) RegisterLocalImages(images []graph.Artifact) {
 	h.localImages = images
 }
 
-func (h *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) {
-	deployutil.AddTagsToPodSelector(artifacts, h.podSelector)
-	h.logger.RegisterArtifacts(artifacts)
+func (h *Deployer) TrackBuildArtifacts(builds, deployedImages []graph.Artifact) {
+	deployutil.AddTagsToPodSelector(builds, deployedImages, h.podSelector)
+	h.logger.RegisterArtifacts(builds)
 }
 
 // Deploy deploys the build results to the Kubernetes cluster
@@ -237,7 +237,7 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
 	}
 
 	childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_LoadImages")
-	if err := h.imageLoader.LoadImages(childCtx, out, h.localImages, nil, builds); err != nil {
+	if err := h.imageLoader.LoadImages(childCtx, out, h.localImages, h.originalImages, builds); err != nil {
 		endTrace(instrumentation.TraceEndError(err))
 		return err
 	}
@@ -290,8 +290,9 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
 	for ns := range nsMap {
 		namespaces = append(namespaces, ns)
 	}
+	deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(manifest.TransformAllowlist, manifest.TransformDenylist))
 
-	h.TrackBuildArtifacts(builds)
+	h.TrackBuildArtifacts(builds, deployedImages)
 	h.trackNamespaces(namespaces)
 	return nil
 }
diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go
index e205be408..adb9a5b56 100644
--- a/pkg/skaffold/deploy/kpt/kpt.go
+++ b/pkg/skaffold/deploy/kpt/kpt.go
@@ -165,9 +165,9 @@ func (k *Deployer) GetSyncer() sync.Syncer {
 }
 
 // TrackBuildArtifacts registers build artifacts to be tracked by a Deployer
-func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) {
-	deployutil.AddTagsToPodSelector(artifacts, k.podSelector)
-	k.logger.RegisterArtifacts(artifacts)
+func (k *Deployer) TrackBuildArtifacts(builds, deployedImages []graph.Artifact) {
+	deployutil.AddTagsToPodSelector(builds, deployedImages, k.podSelector)
+	k.logger.RegisterArtifacts(builds)
 }
 
 func (k *Deployer) RegisterLocalImages(images []graph.Artifact) {
@@ -350,7 +350,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
 		endTrace(instrumentation.TraceEndError(err))
 		return liveApplyErr(err, k.applyDir)
 	}
-	k.TrackBuildArtifacts(builds)
+	k.TrackBuildArtifacts(builds, builds)
 	k.trackNamespaces(namespaces)
 	endTrace()
 	return nil
diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go
index 1b2e3a1c9..1099b3d72 100644
--- a/pkg/skaffold/deploy/kubectl/kubectl.go
+++ b/pkg/skaffold/deploy/kubectl/kubectl.go
@@ -65,8 +65,8 @@ type Deployer struct {
 	statusMonitor      kstatus.Monitor
 	syncer             sync.Syncer
 	hookRunner         hooks.Runner
-	originalImages     []graph.Artifact // the set of images marked as "local" by the Runner
-	localImages        []graph.Artifact // the set of images parsed from the Deployer's manifest set
+	originalImages     []graph.Artifact // the set of images parsed from the Deployer's manifest set
+	localImages        []graph.Artifact // the set of images marked as "local" by the Runner
 	podSelector        *kubernetes.ImageList
 	hydratedManifests  []string
 	workingDir         string
@@ -84,7 +84,7 @@ type Deployer struct {
 
 // NewDeployer returns a new Deployer for a DeployConfig filled
 // with the needed configuration for `kubectl apply`
-func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latest.KubectlDeploy, configName string) (*Deployer, error) {
+func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latest.KubectlDeploy, artifacts []*latest.Artifact, configName string) (*Deployer, error) {
 	defaultNamespace := ""
 	b, err := (&util.Commander{}).RunCmdOut(context.Background(), exec.Command("kubectl", "config", "view", "--minify", "-o", "jsonpath='{..namespace}'"))
 	if err != nil {
@@ -114,7 +114,16 @@ func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latest.KubectlD
 	if err != nil {
 		return nil, err
 	}
+
+	var ogImages []graph.Artifact
+	for _, artifact := range artifacts {
+		ogImages = append(ogImages, graph.Artifact{
+			ImageName: artifact.ImageName,
+		})
+	}
+
 	return &Deployer{
+		originalImages:     ogImages,
 		configName:         configName,
 		KubectlDeploy:      d,
 		podSelector:        podSelector,
@@ -170,9 +179,11 @@ func (k *Deployer) RegisterLocalImages(images []graph.Artifact) {
 	k.localImages = images
 }
 
-func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) {
-	deployutil.AddTagsToPodSelector(artifacts, k.podSelector)
-	k.logger.RegisterArtifacts(artifacts)
+func (k *Deployer) TrackBuildArtifacts(builds, deployedImages []graph.Artifact) {
+	deployutil.AddTagsToPodSelector(builds, deployedImages, k.podSelector)
+
+	// This is to register color for each image logging with a round-robin way.
+	k.logger.RegisterArtifacts(builds)
 }
 
 func (k *Deployer) trackNamespaces(namespaces []string) {
@@ -256,8 +267,9 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
 		endTrace(instrumentation.TraceEndError(err))
 		return err
 	}
+	deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(manifest.TransformAllowlist, manifest.TransformDenylist))
 
-	k.TrackBuildArtifacts(builds)
+	k.TrackBuildArtifacts(builds, deployedImages)
 	k.statusMonitor.RegisterDeployManifests(manifests)
 	endTrace()
 	k.trackNamespaces(namespaces)
diff --git a/pkg/skaffold/deploy/util/util.go b/pkg/skaffold/deploy/util/util.go
index a093bd923..d55ee9db6 100644
--- a/pkg/skaffold/deploy/util/util.go
+++ b/pkg/skaffold/deploy/util/util.go
@@ -66,10 +66,28 @@ func ApplyDefaultRepo(globalConfig string, defaultRepo *string, tag string) (str
 	return newTag, nil
 }
 
-// Update which images are logged.
-func AddTagsToPodSelector(artifacts []graph.Artifact, podSelector *kubernetes.ImageList) {
-	for _, artifact := range artifacts {
-		podSelector.Add(artifact.Tag)
+// Update which images are logged, if the image is present in the provided deployer's artifacts.
+func AddTagsToPodSelector(runnerBuilds []graph.Artifact, deployerArtifacts []graph.Artifact, podSelector *kubernetes.ImageList) {
+	// This implementation is mostly picked from v1 for fixing log duplication issue when multiple deployers are used.
+	// According to the original author "Each Deployer will be directly responsible for adding its deployed artifacts to the PodSelector
+	// by cross-referencing them against the list of images parsed out of the set of manifests they each deploy". Each deploy should only
+	// add its own deployed artifacts to the PodSelector to avoid duplicate logging when multi-deployers are used.
+	// This implementation only streams logs for the intersection of runnerBuilds and deployerArtifacts images, not all images from a deployer
+	// probably because at that time the team didn't want to stream logs from images not built by Skaffold, e.g. images from docker hub, but this
+	// may change. The initial implementation was using imageName as map key for getting shared elements, this was ok as deployerArtifacts were
+	// parsed out from skaffold config files in v1 and tag was not available if not specified. Now deployers don't own render responsibilities
+	// anymore, instead callers pass rendered manifests to deployers, we can only parse artifacts from these rendered manifests. The imageName
+	// from deployerArtifacts here has the default-repo value as prefix while the one from runnerBuilds doesn't. This discrepancy causes artifact.Tag
+	// fail to add into podSelector, which leads to podWatchers fail to get events from pods. As tags are available in deployerArtifacts now, so using
+	// tag as map key to get the shared elements.
+	m := map[string]bool{}
+	for _, a := range deployerArtifacts {
+		m[a.Tag] = true
+	}
+	for _, artifact := range runnerBuilds {
+		if _, ok := m[artifact.Tag]; ok {
+			podSelector.Add(artifact.Tag)
+		}
 	}
 }
 
diff --git a/pkg/skaffold/runner/deployer.go b/pkg/skaffold/runner/deployer.go
index dcc5f8e02..90a75f28e 100644
--- a/pkg/skaffold/runner/deployer.go
+++ b/pkg/skaffold/runner/deployer.go
@@ -158,10 +158,11 @@ func GetDeployer(ctx context.Context, runCtx *runcontext.RunContext, labeller *l
 		}
 
 		if d.KubectlDeploy != nil {
-			deployer, err := kubectl.NewDeployer(dCtx, labeller, d.KubectlDeploy, configName)
+			deployer, err := kubectl.NewDeployer(dCtx, labeller, d.KubectlDeploy, runCtx.Artifacts(), configName)
 			if err != nil {
 				return nil, err
 			}
+
 			deployers = append(deployers, deployer)
 		}
 
@@ -270,7 +271,7 @@ func getDefaultDeployer(runCtx *runcontext.RunContext, labeller *label.DefaultLa
 		DefaultNamespace: defaultNamespace,
 	}
 	dCtx := &deployerCtx{runCtx, latest.DeployConfig{StatusCheck: statusCheck, KubeContext: kubeContext, DeployType: latest.DeployType{KubectlDeploy: k}}}
-	defaultDeployer, err := kubectl.NewDeployer(dCtx, labeller, k, "")
+	defaultDeployer, err := kubectl.NewDeployer(dCtx, labeller, k, runCtx.Artifacts(), "")
 	if err != nil {
 		return nil, fmt.Errorf("instantiating default kubectl deployer: %w", err)
 	}


Test patch:
diff --git a/.github/workflows/unit-tests-darwin.yml b/.github/workflows/unit-tests-darwin.yml
index 62fc654ef..86bd7f243 100644
--- a/.github/workflows/unit-tests-darwin.yml
+++ b/.github/workflows/unit-tests-darwin.yml
@@ -30,8 +30,8 @@ jobs:
     # <https://markphelps.me/posts/speed-up-your-go-builds-with-actions-cache/>
     - id: go-cache-paths
       run: |
-        echo "::set-output name=go-build::$(go env GOCACHE)"
-        echo "::set-output name=go-mod::$(go env GOMODCACHE)"
+        echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
+        echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
 
     - uses: actions/cache@v3
       with:
diff --git a/cmd/skaffold/app/cmd/dev_test.go b/cmd/skaffold/app/cmd/dev_test.go
index c8f43ed56..4263e4dca 100644
--- a/cmd/skaffold/app/cmd/dev_test.go
+++ b/cmd/skaffold/app/cmd/dev_test.go
@@ -83,16 +83,16 @@ func TestDoDev(t *testing.T) {
 			expectedCalls:     []string{"Dev", "DeployManifests", "HasBuilt", "Cleanup", "Prune"},
 		},
 		{
-			description:       "hasn't deployed",
+			description:       "cleanup always gets called even without deployments",
 			hasBuilt:          true,
 			deployedManifests: manifest.ManifestList{},
-			expectedCalls:     []string{"Dev", "DeployManifests", "HasBuilt", "Prune"},
+			expectedCalls:     []string{"Dev", "DeployManifests", "HasBuilt", "Cleanup", "Prune"},
 		},
 		{
 			description:       "hasn't built",
 			hasBuilt:          false,
 			deployedManifests: manifest.ManifestList{},
-			expectedCalls:     []string{"Dev", "DeployManifests", "HasBuilt"},
+			expectedCalls:     []string{"Dev", "DeployManifests", "HasBuilt", "Cleanup"},
 		},
 	}
 
diff --git a/cmd/skaffold/app/signals_test.go b/cmd/skaffold/app/signals_test.go
deleted file mode 100644
index 717b52507..000000000
--- a/cmd/skaffold/app/signals_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-//go:build !windows
-// +build !windows
-
-/*
-Copyright 2019 The Skaffold Authors
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package app
-
-import (
-	"context"
-	"sync"
-	"syscall"
-	"testing"
-)
-
-func TestCatchCtrlC(t *testing.T) {
-	var wg sync.WaitGroup
-	wg.Add(1)
-
-	ctx, cancel := context.WithCancel(context.Background())
-	catchCtrlC(cancel)
-
-	go func() {
-		<-ctx.Done()
-		wg.Done()
-	}()
-
-	syscall.Kill(syscall.Getpid(), syscall.SIGINT)
-
-	wg.Wait()
-}
diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go
index 646e14aea..8fcafa696 100644
--- a/pkg/skaffold/deploy/deploy_mux_test.go
+++ b/pkg/skaffold/deploy/deploy_mux_test.go
@@ -83,7 +83,7 @@ func (m *MockDeployer) GetSyncer() sync.Syncer {
 
 func (m *MockDeployer) RegisterLocalImages(_ []graph.Artifact) {}
 
-func (m *MockDeployer) TrackBuildArtifacts(_ []graph.Artifact) {}
+func (m *MockDeployer) TrackBuildArtifacts(_, _ []graph.Artifact) {}
 
 func (m *MockDeployer) Dependencies() ([]string, error) {
 	return m.dependencies, m.dependenciesErr
diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go
index 62ffa6a7c..22fa55976 100644
--- a/pkg/skaffold/deploy/kubectl/kubectl_test.go
+++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go
@@ -220,7 +220,7 @@ func TestKubectlV1RenderDeploy(t *testing.T) {
 				},
 				RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{
 					Namespace: skaffoldNamespaceOption}},
-			}, &label.DefaultLabeller{}, &test.kubectl, configName)
+			}, &label.DefaultLabeller{}, &test.kubectl, nil, configName)
 			t.RequireNoError(err)
 
 			rc := latest.RenderConfig{Generate: test.generate}
@@ -316,7 +316,7 @@ func TestKubectlCleanup(t *testing.T) {
 			k, err := NewDeployer(&kubectlConfig{
 				workingDir: ".",
 				RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}},
-			}, &label.DefaultLabeller{}, &test.kubectl, configName)
+			}, &label.DefaultLabeller{}, &test.kubectl, nil, configName)
 			t.RequireNoError(err)
 			rc := latest.RenderConfig{Generate: test.generate}
 			mockCfg := &kubectlConfig{
@@ -364,7 +364,7 @@ func TestKubectlRedeploy(t *testing.T) {
 				Enabled: true,
 				Delay:   0 * time.Millisecond,
 				Max:     10 * time.Second},
-		}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, configName)
+		}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, nil, configName)
 		t.RequireNoError(err)
 
 		// Deploy both manifests
@@ -440,7 +440,7 @@ func TestKubectlWaitForDeletions(t *testing.T) {
 				Delay:   0 * time.Millisecond,
 				Max:     10 * time.Second,
 			},
-		}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, configName)
+		}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, nil, configName)
 		t.RequireNoError(err)
 
 		var out bytes.Buffer
@@ -480,7 +480,7 @@ func TestKubectlWaitForDeletionsFails(t *testing.T) {
 				Delay:   10 * time.Second,
 				Max:     100 * time.Millisecond,
 			},
-		}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, configName)
+		}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, nil, configName)
 		t.RequireNoError(err)
 
 		m, err := manifest.Load(bytes.NewReader([]byte(DeploymentWebYAMLv1)))
@@ -544,7 +544,7 @@ func TestGCSManifests(t *testing.T) {
 			k, err := NewDeployer(&kubectlConfig{
 				workingDir: ".",
 				RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}},
-			}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, configName)
+			}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, nil, configName)
 			t.RequireNoError(err)
 
 			err = k.Deploy(context.Background(), io.Discard, nil, m)
@@ -581,7 +581,7 @@ func TestHasRunnableHooks(t *testing.T) {
 	}
 	for _, test := range tests {
 		testutil.Run(t, test.description, func(t *testutil.T) {
-			k, err := NewDeployer(&kubectlConfig{}, &label.DefaultLabeller{}, &test.cfg, "default")
+			k, err := NewDeployer(&kubectlConfig{}, &label.DefaultLabeller{}, &test.cfg, nil, "default")
 			t.RequireNoError(err)
 			actual := k.HasRunnableHooks()
 			t.CheckDeepEqual(test.expected, actual)
diff --git a/pkg/skaffold/deploy/kubectl/kustomize_test.go b/pkg/skaffold/deploy/kubectl/kustomize_test.go
index 40f6859f6..731437cb7 100644
--- a/pkg/skaffold/deploy/kubectl/kustomize_test.go
+++ b/pkg/skaffold/deploy/kubectl/kustomize_test.go
@@ -157,7 +157,7 @@ func TestKustomizeRenderDeploy(t *testing.T) {
 				},
 				RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{
 					Namespace: skaffoldNamespaceOption,
-				}}}, &label.DefaultLabeller{}, &test.kDeploy, "default")
+				}}}, &label.DefaultLabeller{}, &test.kDeploy, nil, "default")
 			t.RequireNoError(err)
 
 			err = k.Deploy(context.Background(), io.Discard, test.builds, m)
@@ -234,7 +234,7 @@ func TestKustomizeCleanup(t *testing.T) {
 				k, err := NewDeployer(&kubectlConfig{
 					RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{
 						Namespace: TestNamespace}},
-				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, "default")
+				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{}, nil, "default")
 				t.RequireNoError(err)
 				err = k.Cleanup(context.Background(), io.Discard, test.dryRun, m)
 				t.CheckError(test.shouldErr, err)
diff --git a/pkg/skaffold/deploy/util/util_test.go b/pkg/skaffold/deploy/util/util_test.go
index 6fab92614..191a66214 100644
--- a/pkg/skaffold/deploy/util/util_test.go
+++ b/pkg/skaffold/deploy/util/util_test.go
@@ -153,6 +153,7 @@ func TestAddTagsToPodSelector(t *testing.T) {
 			deployerArtifacts: []graph.Artifact{
 				{
 					ImageName: "not-my-image",
+					Tag:       "not-my-image:tag",
 				},
 			},
 		},
@@ -175,9 +176,11 @@ func TestAddTagsToPodSelector(t *testing.T) {
 			deployerArtifacts: []graph.Artifact{
 				{
 					ImageName: "my-image1",
+					Tag:       "registry.example.com/repo/my-image1:tag1",
 				},
 				{
 					ImageName: "my-image2",
+					Tag:       "registry.example.com/repo/my-image2:tag2",
 				},
 			},
 			expectedImages: []string{
@@ -186,28 +189,28 @@ func TestAddTagsToPodSelector(t *testing.T) {
 			},
 		},
 		{
-			description: "images from manifest files with ko:// scheme prefix are sanitized before matching",
+			description: "images from deployerManifests with default-repo",
 			artifacts: []graph.Artifact{
 				{
-					ImageName: "ko://git.example.com/Foo/bar",
-					Tag:       "registry.example.com/repo/git.example.com/foo/bar:tag",
+					ImageName: "bar",
+					Tag:       "registry.example.com/bar:tag",
 				},
 			},
 			deployerArtifacts: []graph.Artifact{
 				{
-					ImageName: "git.example.com/foo/bar",
-					Tag:       "ko://git.example.com/Foo/bar",
+					ImageName: "registry.example.com/bar",
+					Tag:       "registry.example.com/bar:tag",
 				},
 			},
 			expectedImages: []string{
-				"registry.example.com/repo/git.example.com/foo/bar:tag",
+				"registry.example.com/bar:tag",
 			},
 		},
 	}
 	for _, test := range tests {
 		testutil.Run(t, test.description, func(t *testutil.T) {
 			podSelector := kubernetes.NewImageList()
-			AddTagsToPodSelector(test.artifacts, podSelector)
+			AddTagsToPodSelector(test.artifacts, test.deployerArtifacts, podSelector)
 			for _, expectedImage := range test.expectedImages {
 				if exists := podSelector.Select(&v1.Pod{
 					Spec: v1.PodSpec{
diff --git a/pkg/skaffold/runner/deployer_test.go b/pkg/skaffold/runner/deployer_test.go
index 882fa9871..72a7312d6 100644
--- a/pkg/skaffold/runner/deployer_test.go
+++ b/pkg/skaffold/runner/deployer_test.go
@@ -102,7 +102,7 @@ func TestGetDeployer(tOuter *testing.T) {
 							[]string{"default"}),
 					}, &label.DefaultLabeller{}, &latest.KubectlDeploy{
 						Flags: latest.KubectlFlags{},
-					}, "default")).(deploy.Deployer),
+					}, nil, "default")).(deploy.Deployer),
 				}, false),
 			},
 			{
@@ -146,7 +146,7 @@ func TestGetDeployer(tOuter *testing.T) {
 						[]string{"default"}),
 				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{
 					Flags: latest.KubectlFlags{},
-				}, "default")).(deploy.Deployer),
+				}, nil, "default")).(deploy.Deployer),
 			},
 			{
 				description: "apply forces creation of kubectl deployer with helm config",
@@ -167,7 +167,7 @@ func TestGetDeployer(tOuter *testing.T) {
 						[]string{"default"}),
 				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{
 					Flags: latest.KubectlFlags{},
-				}, "default")).(deploy.Deployer),
+				}, nil, "default")).(deploy.Deployer),
 			},
 			{
 				description: "multiple deployers",
@@ -261,7 +261,7 @@ func TestGetDeployer(tOuter *testing.T) {
 						[]string{"default"}),
 				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{
 					Flags: latest.KubectlFlags{},
-				}, "default")).(deploy.Deployer),
+				}, nil, "default")).(deploy.Deployer),
 			},
 			{
 				description: "apply works with Cloud Run",
@@ -372,7 +372,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) {
 						[]string{"default"}),
 				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{
 					Flags: latest.KubectlFlags{},
-				}, configNameForDefaultDeployer)).(*kubectl.Deployer),
+				}, nil, configNameForDefaultDeployer)).(*kubectl.Deployer),
 			},
 			{
 				name: "one config with kubectl deploy, with flags",
@@ -397,7 +397,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) {
 						Apply:  []string{"--foo"},
 						Global: []string{"--bar"},
 					},
-				}, configNameForDefaultDeployer)).(*kubectl.Deployer),
+				}, nil, configNameForDefaultDeployer)).(*kubectl.Deployer),
 			},
 			{
 				name: "two kubectl configs with mismatched flags should fail",
@@ -432,7 +432,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) {
 						[]string{"default"}),
 				}, &label.DefaultLabeller{}, &latest.KubectlDeploy{
 					Flags: latest.KubectlFlags{},
-				}, configNameForDefaultDeployer)).(*kubectl.Deployer),
+				}, nil, configNameForDefaultDeployer)).(*kubectl.Deployer),
 			},
 		}
 
diff --git a/pkg/skaffold/runner/runner_test.go b/pkg/skaffold/runner/runner_test.go
index 3cc618be9..c8bff6d18 100644
--- a/pkg/skaffold/runner/runner_test.go
+++ b/pkg/skaffold/runner/runner_test.go
@@ -134,8 +134,8 @@ func (t *TestBench) GetSyncer() sync.Syncer {
 	return t
 }
 
-func (t *TestBench) RegisterLocalImages(_ []graph.Artifact) {}
-func (t *TestBench) TrackBuildArtifacts(_ []graph.Artifact) {}
+func (t *TestBench) RegisterLocalImages(_ []graph.Artifact)    {}
+func (t *TestBench) TrackBuildArtifacts(_, _ []graph.Artifact) {}
 
 func (t *TestBench) TestDependencies(context.Context, *latest.Artifact) ([]string, error) {
 	return nil, nil