Skip to content

Commit 83b4c0c

Browse files
authored
Merge pull request moby#3850 from 38tter/drop-unneeded-variable
solver: drop unneeded variable
2 parents 6d4901c + 9e9cd08 commit 83b4c0c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

solver/llbsolver/solver.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -907,27 +907,26 @@ func inBuilderContext(ctx context.Context, b solver.Builder, name, id string, f
907907
}
908908
return b.InContext(ctx, func(ctx context.Context, g session.Group) error {
909909
pw, _, ctx := progress.NewFromContext(ctx, progress.WithMetadata("vertex", v.Digest))
910-
notifyCompleted := notifyStarted(ctx, &v, false)
910+
notifyCompleted := notifyStarted(ctx, &v)
911911
defer pw.Close()
912912
err := f(ctx, g)
913-
notifyCompleted(err, false)
913+
notifyCompleted(err)
914914
return err
915915
})
916916
}
917917

918-
func notifyStarted(ctx context.Context, v *client.Vertex, cached bool) func(err error, cached bool) {
918+
func notifyStarted(ctx context.Context, v *client.Vertex) func(err error) {
919919
pw, _, _ := progress.NewFromContext(ctx)
920920
start := time.Now()
921921
v.Started = &start
922922
v.Completed = nil
923-
v.Cached = cached
924923
id := identity.NewID()
925924
pw.Write(id, *v)
926-
return func(err error, cached bool) {
925+
return func(err error) {
927926
defer pw.Close()
928927
stop := time.Now()
929928
v.Completed = &stop
930-
v.Cached = cached
929+
v.Cached = false
931930
if err != nil {
932931
v.Error = err.Error()
933932
}

0 commit comments

Comments
 (0)