Skip to content

Commit

Permalink
Merge pull request #4183 from tonistiigi/pull-neg-time
Browse files Browse the repository at this point in the history
pull: fix possible negative blob pull time
  • Loading branch information
tonistiigi authored Aug 29, 2023
2 parents eddfcd5 + 641c552 commit 9bfc68c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/pull/pullprogress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func trackProgress(ctx context.Context, desc ocispecs.Descriptor, manager PullMa

info, err := manager.Info(ctx, desc.Digest)
if err == nil {
// info.CreatedAt could be before started if parallel pull just completed
if info.CreatedAt.Before(started) {
started = info.CreatedAt
}
pw.Write(desc.Digest.String(), progress.Status{
Current: int(info.Size),
Total: int(info.Size),
Expand Down

0 comments on commit 9bfc68c

Please sign in to comment.