Skip to content

Commit

Permalink
fix: Avoid nil context error (#8038)
Browse files Browse the repository at this point in the history
If this code path is followed, we end up with a nil context.
  • Loading branch information
justinsb authored Nov 4, 2022
1 parent fa3c51f commit dfd6015
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/skaffold/deploy/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
return err
}

_, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages")
childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages")
if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil {
endTrace(instrumentation.TraceEndError(err))
return err
Expand Down

0 comments on commit dfd6015

Please sign in to comment.