diff --git a/agent/artifact_batch_creator.go b/agent/artifact_batch_creator.go index ce857f16cc..198b1f99e3 100644 --- a/agent/artifact_batch_creator.go +++ b/agent/artifact_batch_creator.go @@ -76,11 +76,8 @@ func (a *ArtifactBatchCreator) Create(ctx context.Context) ([]*api.Artifact, err // Retry the batch upload a couple of times err = roko.NewRetrier( - // TODO: e.g. roko.ExponentialSubsecond(500*time.Millisecond) WithMaxAttempts(10) - // see: https://github.com/buildkite/roko/pull/8 - // Meanwhile, 8 roko.Exponential(2sec) attempts is 1,2,4,8,16,32,64 seconds delay (~2 mins) - roko.WithMaxAttempts(8), - roko.WithStrategy(roko.Exponential(2*time.Second, 0)), + roko.WithMaxAttempts(10), + roko.WithStrategy(roko.ExponentialSubsecond(500*time.Millisecond)), ).DoWithContext(ctx, func(r *roko.Retrier) error { ctxTimeout := ctx diff --git a/agent/artifact_uploader.go b/agent/artifact_uploader.go index 990d155203..60561ff3e6 100644 --- a/agent/artifact_uploader.go +++ b/agent/artifact_uploader.go @@ -329,11 +329,8 @@ func (a *ArtifactUploader) upload(ctx context.Context, artifacts []*api.Artifact // Update the states of the artifacts in bulk. err := roko.NewRetrier( - // TODO: e.g. roko.ExponentialSubsecond(500*time.Millisecond) WithMaxAttempts(10) - // see: https://github.com/buildkite/roko/pull/8 - // Meanwhile, 8 roko.Exponential(2sec) attempts is 1,2,4,8,16,32,64 seconds delay (~2 mins) - roko.WithMaxAttempts(8), - roko.WithStrategy(roko.Exponential(2*time.Second, 0)), + roko.WithMaxAttempts(10), + roko.WithStrategy(roko.ExponentialSubsecond(500*time.Millisecond)), ).DoWithContext(ctx, func(r *roko.Retrier) error { ctxShort, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel()