progress: fix skipping cached vertex progress

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-18.09
Tonis Tiigi 2017-12-20 21:32:54 -08:00
parent db9437a9c6
commit d804819dad
2 changed files with 4 additions and 2 deletions

View File

@ -258,6 +258,7 @@ func (j *job) getRef(ctx context.Context, cv client.Vertex, index Index) (Ref, e
if err != nil {
return nil, err
}
ctx = progress.WithProgress(ctx, j.pw)
ref, err := getRef(ctx, s, cv, index, j.cache)
if err != nil {
return nil, err
@ -397,8 +398,9 @@ func (vs *vertexStream) append(v client.Vertex) []*client.Vertex {
inpv.Cached = true
inpv.Started = v.Completed
inpv.Completed = v.Completed
out = append(vs.append(*inpv), inpv)
}
delete(vs.cache, inp)
out = append(out, vs.append(*inpv)...)
}
}
}

View File

@ -235,7 +235,7 @@ func (disp *display) print(d displayInfo, all bool) {
fmt.Fprint(disp.c, b.Column(0).ANSI)
statusStr := ""
if d.countCompleted > 0 && d.countCompleted == d.countTotal {
if d.countCompleted > 0 && d.countCompleted == d.countTotal && all {
statusStr = "FINISHED"
}