Unverified Commit c852b8e0 authored by Jeffrey Morgan's avatar Jeffrey Morgan Committed by GitHub
Browse files

server: always print upload/download part info (#8832)

parent d8932c55
...@@ -170,9 +170,12 @@ func (b *blobDownload) Prepare(ctx context.Context, requestURL *url.URL, opts *r ...@@ -170,9 +170,12 @@ func (b *blobDownload) Prepare(ctx context.Context, requestURL *url.URL, opts *r
offset += size offset += size
} }
} else { }
if len(b.Parts) > 0 {
slog.Info(fmt.Sprintf("downloading %s in %d %s part(s)", b.Digest[7:19], len(b.Parts), format.HumanBytes(b.Parts[0].Size))) slog.Info(fmt.Sprintf("downloading %s in %d %s part(s)", b.Digest[7:19], len(b.Parts), format.HumanBytes(b.Parts[0].Size)))
} }
return nil return nil
} }
......
...@@ -108,7 +108,9 @@ func (b *blobUpload) Prepare(ctx context.Context, requestURL *url.URL, opts *reg ...@@ -108,7 +108,9 @@ func (b *blobUpload) Prepare(ctx context.Context, requestURL *url.URL, opts *reg
offset += size offset += size
} }
slog.Info(fmt.Sprintf("uploading %s in %d %s part(s)", b.Digest[7:19], len(b.Parts), format.HumanBytes(b.Parts[0].Size))) if len(b.Parts) > 0 {
slog.Info(fmt.Sprintf("uploading %s in %d %s part(s)", b.Digest[7:19], len(b.Parts), format.HumanBytes(b.Parts[0].Size)))
}
requestURL, err = url.Parse(location) requestURL, err = url.Parse(location)
if err != nil { if err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment