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

[main] Upgrade to latest dependencies #1504

Merged
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
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ require (
k8s.io/apiserver v0.21.4
k8s.io/client-go v0.21.4
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
knative.dev/eventing v0.27.1-0.20211116113552-12418535e186
knative.dev/eventing-kafka v0.27.1-0.20211116080752-19b6cffc9fad
knative.dev/hack v0.0.0-20211112192837-128cf0150a69
knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3
knative.dev/eventing v0.27.1-0.20211117135535-e7452e66b37c
knative.dev/eventing-kafka v0.27.1-0.20211117082433-3237bedea284
knative.dev/hack v0.0.0-20211117134436-69a2295d54ce
knative.dev/pkg v0.0.0-20211117133034-22c0eba0cacf
knative.dev/reconciler-test v0.0.0-20211112132636-ae9e2e21972f
)
16 changes: 9 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1327,20 +1327,22 @@ k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKU
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/control-protocol v0.0.0-20211115173555-0910714d1183/go.mod h1:h/Ac2W8Db0pgTo4baEfzRhn+MPpxJnkSQTBTZjthwXY=
knative.dev/eventing v0.27.1-0.20211115154555-d5201e7b4c2e/go.mod h1:eJGGW9Rbrq585P2Ppc0a+nDLfJzGXe/R8eMXcNwUKlI=
knative.dev/eventing v0.27.1-0.20211116113552-12418535e186 h1:Bcz4Wul/NOx+o1XdAhZecupkaUcHg781FBCrlfTjDbU=
knative.dev/eventing v0.27.1-0.20211116113552-12418535e186/go.mod h1:eJGGW9Rbrq585P2Ppc0a+nDLfJzGXe/R8eMXcNwUKlI=
knative.dev/eventing-kafka v0.27.1-0.20211116080752-19b6cffc9fad h1:Vwv+bMH6rpCyB+GnqAWMV/luYrnS6+Ur30TkOh4PEPo=
knative.dev/eventing-kafka v0.27.1-0.20211116080752-19b6cffc9fad/go.mod h1:pewzUwhWpTybd+lBFbu9ntB1xF8wDIbCQ32SAiRcYpM=
knative.dev/eventing v0.27.1-0.20211117135535-e7452e66b37c h1:m1WFpIweDVlMXm6829Vp5NI2ajSLd9rFlOAZ98RZNo4=
knative.dev/eventing v0.27.1-0.20211117135535-e7452e66b37c/go.mod h1:wfjYgRZX2jlPewfsSGrX2OuOdwbx+n7jryLEz7Dak8k=
knative.dev/eventing-kafka v0.27.1-0.20211117082433-3237bedea284 h1:Jm8m7WDYmo7nqOanv+CsY2UPUK1WtFsGwuCnZFjEEcY=
knative.dev/eventing-kafka v0.27.1-0.20211117082433-3237bedea284/go.mod h1:pewzUwhWpTybd+lBFbu9ntB1xF8wDIbCQ32SAiRcYpM=
knative.dev/hack v0.0.0-20211101195839-11d193bf617b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211108170701-96aac1c30be3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211112192837-128cf0150a69 h1:/3NW6B9VeqAwpW0ZAS+8xLfwgVMIqH+CPmesDATovhk=
knative.dev/hack v0.0.0-20211112192837-128cf0150a69/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211117134436-69a2295d54ce h1:dPARWsX/9nmWg9g09MtGnsn7nZUwjA0UWpKSUozgS6g=
knative.dev/hack v0.0.0-20211117134436-69a2295d54ce/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack/schema v0.0.0-20211112192837-128cf0150a69/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc/go.mod h1:SkfDk9bWIiNZD7XtILGkG7AKVyF/M6M0bGxLgl0SYL8=
knative.dev/pkg v0.0.0-20211111114938-0b0c3390a475/go.mod h1:plYIuKk6WNC9LyiG/9xBnOBYuxO0Ro6xN0z7iXWVUtk=
knative.dev/pkg v0.0.0-20211115071955-517ef0292b53/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3 h1:kJKOHViOLjLx1VpBVs5uJFSXTVEdyQylaHOJCU4AVVY=
knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/pkg v0.0.0-20211117100634-54071addcdb8/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/pkg v0.0.0-20211117133034-22c0eba0cacf h1:8hLmIbMv9lvpLwjuaVH/rEJ9fKrThEWViyzYZcBPNNc=
knative.dev/pkg v0.0.0-20211117133034-22c0eba0cacf/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/reconciler-test v0.0.0-20211112132636-ae9e2e21972f h1:bSdsp5av09LqSF4iXo8LCCDEENJ+JEbzzdgHBoJdf2w=
knative.dev/reconciler-test v0.0.0-20211112132636-ae9e2e21972f/go.mod h1:gTsbLk496j/M9xqMpx/liyCQ0X3bwDpRtcs2Zzws364=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
Expand Down
19 changes: 1 addition & 18 deletions vendor/knative.dev/eventing/test/lib/creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package lib
import (
"context"
"fmt"
"strings"

appsv1 "k8s.io/api/apps/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
Expand All @@ -29,7 +28,6 @@ import (
apierrs "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/util/retry"

duckv1 "knative.dev/pkg/apis/duck/v1"
"knative.dev/pkg/reconciler"
Expand All @@ -52,23 +50,8 @@ var coreAPIVersion = corev1.SchemeGroupVersion.Version
var rbacAPIGroup = rbacv1.SchemeGroupVersion.Group
var rbacAPIVersion = rbacv1.SchemeGroupVersion.Version

// This is a workaround for https://github.com/knative/pkg/issues/1509
// Because tests currently fail immediately on any creation failure, this
// is problematic. On the reconcilers it's not an issue because they recover,
// but tests need this retry.
//
// https://github.com/knative/eventing/issues/3681
func isWebhookError(err error) bool {
return strings.Contains(err.Error(), "eventing-webhook.knative-eventing")
}

func (c *Client) RetryWebhookErrors(updater func(int) error) error {
attempts := 0
return retry.OnError(retry.DefaultRetry, isWebhookError, func() error {
err := updater(attempts)
attempts++
return err
})
return duck.RetryWebhookErrors(updater)
}

// CreateChannelOrFail will create a typed Channel Resource in Eventing or fail the test if there is an error.
Expand Down
6 changes: 6 additions & 0 deletions vendor/knative.dev/pkg/test/spoof/error_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package spoof
import (
"errors"
"net"
"net/http"
"strings"
)

Expand Down Expand Up @@ -62,3 +63,8 @@ func isConnectionReset(err error) bool {
func isNoRouteToHostError(err error) bool {
return err != nil && strings.Contains(err.Error(), "connect: no route to host")
}

func isResponseDNSError(resp *Response) bool {
// no such host with 502 is sent back from istio-ingressgateway when it fails to resolve domain.
return resp.StatusCode == http.StatusBadGateway && strings.Contains(string(resp.Body), "no such host")
}
10 changes: 9 additions & 1 deletion vendor/knative.dev/pkg/test/spoof/spoof.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (sc *SpoofingClient) Do(req *http.Request, errorRetryCheckers ...interface{
// If no retry checkers are specified `DefaultErrorRetryChecker` will be used.
func (sc *SpoofingClient) Poll(req *http.Request, inState ResponseChecker, checkers ...interface{}) (*Response, error) {
if len(checkers) == 0 {
checkers = []interface{}{ErrorRetryChecker(DefaultErrorRetryChecker)}
checkers = []interface{}{ErrorRetryChecker(DefaultErrorRetryChecker), ResponseRetryChecker(DefaultResponseRetryChecker)}
}

var resp *Response
Expand Down Expand Up @@ -255,6 +255,14 @@ func DefaultErrorRetryChecker(err error) (bool, error) {
return false, err
}

// DefaultResponseRetryChecker implements the defaults for retrying on response.
func DefaultResponseRetryChecker(resp *Response) (bool, error) {
if isResponseDNSError(resp) {
return true, fmt.Errorf("retrying for DNS related failure response: %v", resp)
}
return false, nil
}

// logZipkinTrace provides support to log Zipkin Trace for param: spoofResponse
// We only log Zipkin trace for HTTP server errors i.e for HTTP status codes between 500 to 600
func (sc *SpoofingClient) logZipkinTrace(spoofResp *Response) {
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.27.1-0.20211116113552-12418535e186
# knative.dev/eventing v0.27.1-0.20211117135535-e7452e66b37c
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/duck
Expand Down Expand Up @@ -1211,7 +1211,7 @@ knative.dev/eventing/test/test_images/performance
knative.dev/eventing/test/test_images/print
knative.dev/eventing/test/test_images/recordevents
knative.dev/eventing/test/test_images/request-sender
# knative.dev/eventing-kafka v0.27.1-0.20211116080752-19b6cffc9fad
# knative.dev/eventing-kafka v0.27.1-0.20211117082433-3237bedea284
## explicit
knative.dev/eventing-kafka/pkg/apis/bindings
knative.dev/eventing-kafka/pkg/apis/bindings/v1beta1
Expand Down Expand Up @@ -1265,10 +1265,10 @@ knative.dev/eventing-kafka/pkg/common/kafka/sarama
knative.dev/eventing-kafka/test/e2e/helpers
knative.dev/eventing-kafka/test/lib
knative.dev/eventing-kafka/test/lib/resources
# knative.dev/hack v0.0.0-20211112192837-128cf0150a69
# knative.dev/hack v0.0.0-20211117134436-69a2295d54ce
## explicit
knative.dev/hack
# knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3
# knative.dev/pkg v0.0.0-20211117133034-22c0eba0cacf
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down