Prechádzať zdrojové kódy

c8d/pull: Don't emit `Downloading` with 0 progress

To align with the graphdrivers behavior and don't send unnecessary
progress messages.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Paweł Gronowski 1 rok pred
rodič
commit
14df52b709
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      daemon/containerd/progress.go

+ 3 - 0
daemon/containerd/progress.go

@@ -135,6 +135,9 @@ func (p pullProgress) UpdateProgress(ctx context.Context, ongoing *jobs, out pro
 		}
 		key := remotes.MakeRefKey(ctx, j)
 		if info, ok := pulling[key]; ok {
+			if info.Offset == 0 {
+				continue
+			}
 			out.WriteProgress(progress.Progress{
 				ID:      stringid.TruncateID(j.Digest.Encoded()),
 				Action:  "Downloading",