Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update module github.com/cenkalti/backoff/v4 to v5 #824

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/shared/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"k8s.io/client-go/tools/clientcmd"

"github.com/cenkalti/backoff/v4"
"github.com/cenkalti/backoff/v5"
"k8s.io/apimachinery/pkg/types"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -178,7 +178,7 @@
}

func WaitUntilResourceReadyOrNotReady(ctx context.Context, apiClient client.Client, resource lifecycle.RuntimeObject, name, namespace string, applyFunc WaitApplyFunc, readyStatus bool) error {
b := backoff.NewExponentialBackOff(backoff.WithInitialInterval(5*time.Second), backoff.WithMaxElapsedTime(defaultElapsedTime))

Check failure on line 181 in e2e/shared/e2e.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 181 in e2e/shared/e2e.go

View workflow job for this annotation

GitHub Actions / test

undefined: backoff.WithInitialInterval
return backoff.Retry(func() error {
Logf("waiting for resource %s to be ready... \n", name)
err := apiClient.Get(ctx, client.ObjectKey{Name: name, Namespace: namespace}, resource)
Expand All @@ -202,13 +202,13 @@
return fmt.Errorf("resource %s is not yet in expected state", resource.GetName())
}
return nil
}, b)

Check failure on line 205 in e2e/shared/e2e.go

View workflow job for this annotation

GitHub Actions / test

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)
}

// WaitUntilNamespaceCreated waits until the namespace is created and active
// TODO: Remove this once organization controller is standardized
func WaitUntilNamespaceCreated(ctx context.Context, k8sClient client.Client, name string) error {
b := backoff.NewExponentialBackOff(backoff.WithInitialInterval(5*time.Second), backoff.WithMaxElapsedTime(30*time.Second))

Check failure on line 211 in e2e/shared/e2e.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to backoff.NewExponentialBackOff
return backoff.Retry(func() error {
Logf("waiting for namespace %s to be created...", name)
ns := &corev1.Namespace{}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ replace (
)

require (
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cenkalti/backoff/v5 v5.0.2
github.com/dexidp/dex v0.0.0-20240807174518-43956db7fd75
github.com/ghodss/yaml v1.0.0
github.com/go-jose/go-jose/v4 v4.0.4
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuP
github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/local/setup/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"k8s.io/utils/ptr"

"github.com/cenkalti/backoff/v4"
"github.com/cenkalti/backoff/v5"

aregv1 "k8s.io/api/admissionregistration/v1"
appsv1 "k8s.io/api/apps/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/local/utils/expect.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"errors"
"time"

"github.com/cenkalti/backoff/v4"
"github.com/cenkalti/backoff/v5"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
Expand All @@ -19,7 +19,7 @@

// WaitUntilSecretCreated - waits until a secret is created in the given namespace with a backoff strategy
func WaitUntilSecretCreated(ctx context.Context, k8sClient client.Client, name, namespace string) error {
b := backoff.NewExponentialBackOff(backoff.WithInitialInterval(5*time.Second), backoff.WithMaxElapsedTime(DefaultElapsedTime))

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / build

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / build

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.31.0) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.31.0) E2E

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.29.8) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.29.8) E2E

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.31.0) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.31.0) E2E

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.30.4) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.30.4) E2E

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.29.8) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.29.8) E2E

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.30.4) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.30.4) E2E

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / test

undefined: backoff.WithInitialInterval

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / codeql / Analyze (default, go, 1.23, node)

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 22 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / codeql / Analyze (default, go, 1.23, node)

undefined: backoff.WithInitialInterval
return backoff.Retry(func() error {
Logf("waiting for secret %s to be created...", name)
secret := &v1.Secret{}
Expand All @@ -31,12 +31,12 @@
return err
}
return nil
}, b)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / build

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.31.0) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.29.8) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.31.0) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.30.4) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.29.8) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.30.4) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / test

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 34 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / codeql / Analyze (default, go, 1.23, node)

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)
}

// WaitUntilJobSucceeds - waits until a job succeeds in the given namespace with a backoff strategy
func WaitUntilJobSucceeds(ctx context.Context, k8sClient client.Client, name, namespace string) error {
b := backoff.NewExponentialBackOff(backoff.WithInitialInterval(5*time.Second), backoff.WithMaxElapsedTime(DefaultElapsedTime))

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / build

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / build

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.31.0) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.31.0) E2E

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.29.8) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.29.8) E2E

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.31.0) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.31.0) E2E

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.30.4) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.30.4) E2E

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.29.8) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.29.8) E2E

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.30.4) E2E

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.30.4) E2E

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / test

undefined: backoff.WithInitialInterval

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / codeql / Analyze (default, go, 1.23, node)

too many arguments in call to backoff.NewExponentialBackOff

Check failure on line 39 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / codeql / Analyze (default, go, 1.23, node)

undefined: backoff.WithInitialInterval
return backoff.Retry(func() error {
Logf("waiting for job %s to succeed...", name)
job := &batchv1.Job{}
Expand All @@ -55,5 +55,5 @@
return errors.New("job is not yet ready")
}
return nil
}, b)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / build

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / lint

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T) (typecheck)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.31.0) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.29.8) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.31.0) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.30.4) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run cluster(v1.29.8) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / Run plugin(v1.30.4) E2E

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / test

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)

Check failure on line 58 in pkg/internal/local/utils/expect.go

View workflow job for this annotation

GitHub Actions / codeql / Analyze (default, go, 1.23, node)

in call to backoff.Retry, type *backoff.ExponentialBackOff of b does not match backoff.Operation[T] (cannot infer T)
}
Loading