Skip to content

Commit

Permalink
Retry binary download every minute for 10 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
daehyeok committed Dec 29, 2020
1 parent 92511de commit f3a5ac4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/minikube/perf/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ import (
"runtime"
"strconv"
"strings"
"time"

"cloud.google.com/go/storage"
"github.com/pkg/errors"
"google.golang.org/api/option"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/util/retry"
)

// Binary holds a minikube binary
Expand Down Expand Up @@ -109,9 +111,11 @@ func newBinaryFromPR(pr string) (*Binary, error) {
path: localMinikubePath(i),
pr: i,
}
if err := b.download(); err != nil {

if err := retry.Expo(b.download, 1*time.Minute, 10*time.Minute); err != nil {
return nil, errors.Wrapf(err, "downloading binary")
}

return b, nil
}

Expand Down

0 comments on commit f3a5ac4

Please sign in to comment.