Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
upgrade to latest dependencies (#1423)
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing d978f3c...62e797b:
  > 62e797b [main] Upgrade to latest dependencies (# 7428)
bumping knative.dev/reconciler-test 212f3db...d2429fb:
  > d2429fb use context poll interval/timeout in DeleteResources (# 626)
  > 04b80d7 upgrade to latest dependencies (# 627)
bumping knative.dev/pkg acf0a2d...5c9b7a8:
  > 5c9b7a8 upgrade to latest dependencies (# 2887)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Nov 7, 2023
1 parent b704a1c commit 942cd7c
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 34 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ require (
k8s.io/apimachinery v0.27.6
k8s.io/client-go v0.27.6
k8s.io/utils v0.0.0-20230209194617-a36077c30491
knative.dev/eventing v0.39.1-0.20231103063133-d978f3c993fd
knative.dev/eventing v0.39.1-0.20231106141706-62e797b257bb
knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63
knative.dev/pkg v0.0.0-20231106073528-acf0a2d2dea9
knative.dev/reconciler-test v0.0.0-20231103063332-212f3db95925
knative.dev/pkg v0.0.0-20231107094615-5c9b7a8d8265
knative.dev/reconciler-test v0.0.0-20231107120858-d2429fb0b545
sigs.k8s.io/yaml v1.4.0
)

Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -935,14 +935,14 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg=
k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY=
k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.39.1-0.20231103063133-d978f3c993fd h1:TqqEeyk73nRY4excMiV3+gt8v9+0eWFnG6B7jzD3Ma4=
knative.dev/eventing v0.39.1-0.20231103063133-d978f3c993fd/go.mod h1:CR1AGu7mtm9w3JdRpdrolMmoYtOeP4vb0jPUMOi0r6U=
knative.dev/eventing v0.39.1-0.20231106141706-62e797b257bb h1:cqDvaK7znWzq/UbObhAX8FSWzriZHPBi2QT/xIg1iGo=
knative.dev/eventing v0.39.1-0.20231106141706-62e797b257bb/go.mod h1:2+O6/8BM8o1mMUeaZgAh78u3dAQ0zbbf1Tlt2QEa2zs=
knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63 h1:QNbIbsep8jreNCXj3EFrsw0RtsrmMZw7yxYyUG5AILs=
knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20231106073528-acf0a2d2dea9 h1:9JQb0ETlOXxtXb6zeJuvjcdsI5BQ83Rv1PEzIzC8B8U=
knative.dev/pkg v0.0.0-20231106073528-acf0a2d2dea9/go.mod h1:jCNm6Y66ArM8uDqpHwRwW7LuMFn79Q3KIn5L1R/WfI4=
knative.dev/reconciler-test v0.0.0-20231103063332-212f3db95925 h1:Iz7vRfFWMK2nu1znle0uXHg5bRPwCTAVFVwKir0tBl0=
knative.dev/reconciler-test v0.0.0-20231103063332-212f3db95925/go.mod h1:Ok0TfApVs8qkbytYq70Q7aetM21J3L41x9c3HKI/U1I=
knative.dev/pkg v0.0.0-20231107094615-5c9b7a8d8265 h1:wFDUSmvSQF48tUCIUIFKMOxq9jpV+vXf5l+RZYxYyt4=
knative.dev/pkg v0.0.0-20231107094615-5c9b7a8d8265/go.mod h1:P3m1Mg/FJjmr9oFHfWcoUbJLSlBi/hgwakobPxyqrZ4=
knative.dev/reconciler-test v0.0.0-20231107120858-d2429fb0b545 h1:0F0E77IbX5XxCxZ19Gopygwy+b6pVktrYAzMcFnVhK4=
knative.dev/reconciler-test v0.0.0-20231107120858-d2429fb0b545/go.mod h1:R7GebYEQbys4NXZJa0EzYx6+Hw3LZduuDkvp8FdBPU8=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
27 changes: 8 additions & 19 deletions vendor/knative.dev/reconciler-test/pkg/environment/timings.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,26 @@ package environment
import (
"context"
"time"

"knative.dev/reconciler-test/pkg/state"
)

// this has been moved to state pkg to break cycle between environment and feature package,
// keeping the consts here for backwards API compatibility
const (
DefaultPollInterval = 3 * time.Second
DefaultPollTimeout = 2 * time.Minute
)

type timingsKey struct{}
type timingsType struct {
interval time.Duration
timeout time.Duration
}

// PollTimingsFromContext will get the previously set poll timing from context,
// or return the defaults if not found.
// - values from from context.
// - defaults.
// ContextWithPollTimings returns a context with poll timings set
func ContextWithPollTimings(ctx context.Context, interval, timeout time.Duration) context.Context {
return context.WithValue(ctx, timingsKey{}, timingsType{
interval: interval,
timeout: timeout,
})
return state.ContextWithPollTimings(ctx, interval, timeout)
}

// PollTimingsFromContext will get the previously set poll timing from context,
// or return the defaults if not found.
// - values from from context.
// - values from context.
// - defaults.
func PollTimingsFromContext(ctx context.Context) (time.Duration, time.Duration) {
if t, ok := ctx.Value(timingsKey{}).(timingsType); ok {
return t.interval, t.timeout
}
return DefaultPollInterval, DefaultPollTimeout
return state.PollTimingsFromContext(ctx)
}
5 changes: 2 additions & 3 deletions vendor/knative.dev/reconciler-test/pkg/feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"runtime"
"strings"
"sync"
"time"

corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -32,7 +31,6 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"knative.dev/pkg/apis"
"knative.dev/pkg/injection/clients/dynamicclient"

"knative.dev/reconciler-test/pkg/state"
)

Expand Down Expand Up @@ -229,7 +227,8 @@ func DeleteResources(ctx context.Context, t T, refs []corev1.ObjectReference) er

var lastResource corev1.ObjectReference // One still present resource

err := wait.Poll(time.Second, 4*time.Minute, func() (bool, error) {
interval, timeout := state.PollTimingsFromContext(ctx)
err := wait.Poll(interval, timeout, func() (bool, error) {
for _, ref := range refs {
gv, err := schema.ParseGroupVersion(ref.APIVersion)
if err != nil {
Expand Down
52 changes: 52 additions & 0 deletions vendor/knative.dev/reconciler-test/pkg/state/timings.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
Copyright 2021 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package state

import (
"context"
"time"
)

const (
DefaultPollInterval = 3 * time.Second
DefaultPollTimeout = 2 * time.Minute
)

type timingsKey struct{}
type timingsType struct {
interval time.Duration
timeout time.Duration
}

// ContextWithPollTimings returns a context with poll timings set
func ContextWithPollTimings(ctx context.Context, interval, timeout time.Duration) context.Context {
return context.WithValue(ctx, timingsKey{}, timingsType{
interval: interval,
timeout: timeout,
})
}

// PollTimingsFromContext will get the previously set poll timing from context,
// or return the defaults if not found.
// - values from context.
// - defaults.
func PollTimingsFromContext(ctx context.Context) (time.Duration, time.Duration) {
if t, ok := ctx.Value(timingsKey{}).(timingsType); ok {
return t.interval, t.timeout
}
return DefaultPollInterval, DefaultPollTimeout
}
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.39.1-0.20231103063133-d978f3c993fd
# knative.dev/eventing v0.39.1-0.20231106141706-62e797b257bb
## explicit; go 1.19
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/pkg/adapter/v2
Expand Down Expand Up @@ -1399,7 +1399,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/sender
## explicit; go 1.18
knative.dev/hack
knative.dev/hack/shell
# knative.dev/pkg v0.0.0-20231106073528-acf0a2d2dea9
# knative.dev/pkg v0.0.0-20231107094615-5c9b7a8d8265
## explicit; go 1.18
knative.dev/pkg/apiextensions/storageversion
knative.dev/pkg/apiextensions/storageversion/cmd/migrate
Expand Down Expand Up @@ -1497,7 +1497,7 @@ knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/conversion
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# knative.dev/reconciler-test v0.0.0-20231103063332-212f3db95925
# knative.dev/reconciler-test v0.0.0-20231107120858-d2429fb0b545
## explicit; go 1.20
knative.dev/reconciler-test/cmd/eventshub
knative.dev/reconciler-test/pkg/environment
Expand Down

0 comments on commit 942cd7c

Please sign in to comment.