add maximum retries when pushing (#334)

This commit is contained in:
Patrick Devine 2023-08-11 15:41:55 -07:00 committed by GitHub
parent 1556162c90
commit d9cf18e28d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 21 deletions

View file

@ -137,7 +137,7 @@ func doDownload(ctx context.Context, mp ModelPath, regOpts *RegistryOptions, f *
"Range": fmt.Sprintf("bytes=%d-", size),
}
resp, err := makeRequest("GET", url, headers, nil, regOpts)
resp, err := makeRequest(ctx, "GET", url, headers, nil, regOpts)
if err != nil {
log.Printf("couldn't download blob: %v", err)
return err