Merge pull request #2689 from tonistiigi/active-status

progressui: handle active statuses for completed vertex
master
Tõnis Tiigi 2022-03-01 18:36:03 -08:00 committed by GitHub
commit 2dfbe317c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -81,6 +81,7 @@ func (p *textMux) printVtx(t *trace, dgst digest.Digest) {
}
v.events = v.events[:0]
isOpenStatus := false // remote cache loading can currently produce status updates without active vertex
for _, s := range v.statuses {
if _, ok := v.statusUpdates[s.ID]; ok {
doPrint := true
@ -124,6 +125,8 @@ func (p *textMux) printVtx(t *trace, dgst digest.Digest) {
}
if s.Completed != nil {
tm += " done"
} else {
isOpenStatus = true
}
fmt.Fprintf(p.w, "#%d %s%s%s\n", v.index, s.ID, bytes, tm)
}
@ -163,7 +166,7 @@ func (p *textMux) printVtx(t *trace, dgst digest.Digest) {
}
p.current = dgst
if v.Completed != nil {
if v.Completed != nil && !isOpenStatus {
p.current = ""
v.count = 0