Skip to content

Commit bad5a63

Browse files
tonistiigijedevc
authored andcommitted
pull: fix possible negative blob pull time
Signed-off-by: Tonis Tiigi <[email protected]> (cherry picked from commit 641c552) Signed-off-by: Justin Chadwell <[email protected]>
1 parent dbfb610 commit bad5a63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

util/pull/pullprogress/progress.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ func trackProgress(ctx context.Context, desc ocispecs.Descriptor, manager PullMa
129129

130130
info, err := manager.Info(ctx, desc.Digest)
131131
if err == nil {
132+
// info.CreatedAt could be before started if parallel pull just completed
133+
if info.CreatedAt.Before(started) {
134+
started = info.CreatedAt
135+
}
132136
pw.Write(desc.Digest.String(), progress.Status{
133137
Current: int(info.Size),
134138
Total: int(info.Size),

0 commit comments

Comments
 (0)