Skip to content

Commit 3864896

Browse files
authored
redo deduplication of deploy taskevents (#5949)
1 parent 586578c commit 3864896

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/skaffold/runner/v1/deploy.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ import (
4141

4242
// DeployAndLog deploys a list of already built artifacts and optionally show the logs.
4343
func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error {
44-
eventV2.TaskInProgress(constants.Deploy, "Deploy to cluster")
45-
4644
// Update which images are logged.
4745
r.AddTagsToPodSelector(artifacts)
4846

@@ -53,7 +51,6 @@ func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifa
5351
logger.SetSince(time.Now())
5452
// First deploy
5553
if err := r.Deploy(ctx, out, artifacts); err != nil {
56-
eventV2.TaskFailed(constants.Deploy, err)
5754
return err
5855
}
5956

@@ -66,7 +63,6 @@ func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifa
6663

6764
// Start printing the logs after deploy is finished
6865
if err := logger.Start(ctx, r.runCtx.GetNamespaces()); err != nil {
69-
eventV2.TaskFailed(constants.Deploy, err)
7066
return fmt.Errorf("starting logger: %w", err)
7167
}
7268

@@ -75,7 +71,6 @@ func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifa
7571
<-ctx.Done()
7672
}
7773

78-
eventV2.TaskSucceeded(constants.Deploy)
7974
return nil
8075
}
8176

@@ -126,7 +121,7 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`)
126121
}
127122

128123
event.DeployInProgress()
129-
eventV2.TaskInProgress(constants.Deploy, "")
124+
eventV2.TaskInProgress(constants.Deploy, "Deploy to cluster")
130125
ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy_Deploying")
131126
defer endTrace()
132127

0 commit comments

Comments
 (0)