Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing 7e1c082...4cec554:
  > 4cec554 [main] Upgrade to latest dependencies (# 7818)
bumping knative.dev/pkg 03bf3de...fef5da9:
  > fef5da9 Replace all usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout (# 3004)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Apr 3, 2024
1 parent b587dd7 commit b4b1a7f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ require (
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3
knative.dev/eventing v0.40.1-0.20240402102742-4cec55450957
knative.dev/hack v0.0.0-20240327150553-47368d631660
knative.dev/hack/schema v0.0.0-20240327150553-47368d631660
knative.dev/pkg v0.0.0-20240401190221-03bf3de6e2bc
knative.dev/pkg v0.0.0-20240402144403-fef5da99bd14
knative.dev/reconciler-test v0.0.0-20240327131444-6346b918a853
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -893,14 +893,14 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3 h1:+5XTIq9iJgk1Br0Ex5nEJBhy9wGMVaFY6HzW0/E0mrU=
knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3/go.mod h1:19sfPiy4dK2jBIHgszOTk43qOvfCXz1GTIncRY3trB8=
knative.dev/eventing v0.40.1-0.20240402102742-4cec55450957 h1:emsn7mCg3YiSiYWWGG96QBU3UxLYDsHFE/O0QpT3TjM=
knative.dev/eventing v0.40.1-0.20240402102742-4cec55450957/go.mod h1:uI9NfjmGJUXITlhdMus7K+LYZYxH85pf67HfJjyCMfs=
knative.dev/hack v0.0.0-20240327150553-47368d631660 h1:tW6NgyjMnSXBS75+k+Xh5uNiLhJ9TFswS9hrkC3OQOc=
knative.dev/hack v0.0.0-20240327150553-47368d631660/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/hack/schema v0.0.0-20240327150553-47368d631660 h1:aXrY48YoL6p97e10do+hjXRFoa+6N9zJIzAclykEpy0=
knative.dev/hack/schema v0.0.0-20240327150553-47368d631660/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0=
knative.dev/pkg v0.0.0-20240401190221-03bf3de6e2bc h1:qgjjXNqWPaIfxO00DbbB+SaeaKiwvMTIB3BcBtuzoqc=
knative.dev/pkg v0.0.0-20240401190221-03bf3de6e2bc/go.mod h1:086p4jjTy1KCaL2uoznjgh+kKVp0Vk2hh4yagpbUhOA=
knative.dev/pkg v0.0.0-20240402144403-fef5da99bd14 h1:WQEFu4M1CGsz1TQNHO6N34asNTInsEw26nqw5p1lxhE=
knative.dev/pkg v0.0.0-20240402144403-fef5da99bd14/go.mod h1:086p4jjTy1KCaL2uoznjgh+kKVp0Vk2hh4yagpbUhOA=
knative.dev/reconciler-test v0.0.0-20240327131444-6346b918a853 h1:YNnU474EU6U4iBEVGV9zZmEH/IbZIQwJ4I4OU4PHodQ=
knative.dev/reconciler-test v0.0.0-20240327131444-6346b918a853/go.mod h1:e3ZGbaE4B/7hIDyxxkEIYyGdkXB/51gMaEdH8pPpXIM=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/injection/sharedmain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func GetLoggingConfig(ctx context.Context) (*logging.Config, error) {
// These timeout and retry interval are set by heuristics.
// e.g. istio sidecar needs a few seconds to configure the pod network.
var lastErr error
if err := wait.PollImmediate(1*time.Second, 5*time.Second, func() (bool, error) {
if err := wait.PollUntilContextTimeout(ctx, 1*time.Second, 5*time.Second, true, func(ctx context.Context) (bool, error) {
loggingConfigMap, lastErr = kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, logging.ConfigMapName(), metav1.GetOptions{})
return lastErr == nil || apierrors.IsNotFound(lastErr), nil
}); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/reconciler/testing/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func RunAndSyncInformers(ctx context.Context, informers ...controller.Informer)
return wf, err
}

err = wait.PollImmediate(time.Microsecond, wait.ForeverTestTimeout, func() (bool, error) {
err = wait.PollUntilContextTimeout(ctx, time.Microsecond, wait.ForeverTestTimeout, true, func(ctx context.Context) (bool, error) {
if watchesPending.Load() == 0 {
return true, nil
}
Expand Down
14 changes: 7 additions & 7 deletions vendor/knative.dev/pkg/test/kube_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func WaitForDeploymentState(ctx context.Context, client kubernetes.Interface, na
span := logging.GetEmitableSpan(ctx, fmt.Sprintf("WaitForDeploymentState/%s/%s", name, desc))
defer span.End()
var lastState *appsv1.Deployment
waitErr := wait.PollImmediate(interval, timeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, interval, timeout, true, func(ctx context.Context) (bool, error) {
var err error
lastState, err = d.Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand All @@ -78,7 +78,7 @@ func WaitForPodListState(ctx context.Context, client kubernetes.Interface, inSta
defer span.End()

var lastState *corev1.PodList
waitErr := wait.PollImmediate(interval, podTimeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, interval, podTimeout, true, func(ctx context.Context) (bool, error) {
var err error
lastState, err = p.List(ctx, metav1.ListOptions{})
if err != nil {
Expand All @@ -103,7 +103,7 @@ func WaitForPodState(ctx context.Context, client kubernetes.Interface, inState f
defer span.End()

var lastState *corev1.Pod
waitErr := wait.PollImmediate(interval, podTimeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, interval, podTimeout, true, func(ctx context.Context) (bool, error) {
var err error
lastState, err = p.Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand Down Expand Up @@ -139,7 +139,7 @@ func WaitForServiceEndpoints(ctx context.Context, client kubernetes.Interface, s
defer span.End()

var endpoints *corev1.Endpoints
waitErr := wait.PollImmediate(interval, podTimeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, interval, podTimeout, true, func(ctx context.Context) (bool, error) {
var err error
endpoints, err = endpointsService.Get(ctx, svcName, metav1.GetOptions{})
if apierrs.IsNotFound(err) {
Expand Down Expand Up @@ -186,7 +186,7 @@ func GetEndpointAddresses(ctx context.Context, client kubernetes.Interface, svcN
// WaitForChangedEndpoints waits until the endpoints for the given service differ from origEndpoints.
func WaitForChangedEndpoints(ctx context.Context, client kubernetes.Interface, svcName, svcNamespace string, origEndpoints []string) error {
var newEndpoints []string
waitErr := wait.PollImmediate(1*time.Second, 2*time.Minute, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, 1*time.Second, 2*time.Minute, true, func(ctx context.Context) (bool, error) {
var err error
newEndpoints, err = GetEndpointAddresses(ctx, client, svcName, svcNamespace)
return !cmp.Equal(origEndpoints, newEndpoints), err
Expand All @@ -213,7 +213,7 @@ func DeploymentScaledToZeroFunc() func(d *appsv1.Deployment) (bool, error) {
// If the content is not present within timeout it returns error.
func WaitForLogContent(ctx context.Context, client kubernetes.Interface, podName, containerName, namespace, content string) error {
var logs []byte
waitErr := wait.PollImmediate(interval, logTimeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, interval, logTimeout, true, func(ctx context.Context) (bool, error) {
var err error
logs, err = PodLogs(ctx, client, podName, containerName, namespace)
if err != nil {
Expand All @@ -236,7 +236,7 @@ func WaitForAllPodsRunning(ctx context.Context, client kubernetes.Interface, nam
func WaitForPodRunning(ctx context.Context, client kubernetes.Interface, name string, namespace string) error {
var p *corev1.Pod
pods := client.CoreV1().Pods(namespace)
waitErr := wait.PollImmediate(interval, podTimeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, interval, podTimeout, true, func(ctx context.Context) (bool, error) {
var err error
p, err = pods.Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/test/spoof/spoof.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (sc *SpoofingClient) Poll(req *http.Request, inState ResponseChecker, check
}

var resp *Response
err := wait.PollImmediate(sc.RequestInterval, sc.RequestTimeout, func() (bool, error) {
err := wait.PollUntilContextTimeout(context.Background(), sc.RequestInterval, sc.RequestTimeout, true, func(ctx context.Context) (bool, error) {
// Starting span to capture zipkin trace.
traceContext, span := trace.StartSpan(req.Context(), "SpoofingClient-Trace")
defer span.End()
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3
# knative.dev/eventing v0.40.1-0.20240402102742-4cec55450957
## explicit; go 1.21
knative.dev/eventing/pkg/apis
knative.dev/eventing/pkg/apis/config
Expand Down Expand Up @@ -1156,7 +1156,7 @@ knative.dev/hack/schema/commands
knative.dev/hack/schema/docs
knative.dev/hack/schema/registry
knative.dev/hack/schema/schema
# knative.dev/pkg v0.0.0-20240401190221-03bf3de6e2bc
# knative.dev/pkg v0.0.0-20240402144403-fef5da99bd14
## explicit; go 1.21
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down

0 comments on commit b4b1a7f

Please sign in to comment.