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

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/networking 2002961...a3d8b0f:
  > a3d8b0f Replace all usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout (# 957)
  > 1a6e0da some conformance tests assume we're getting back a runtime request (# 964)
  > 2a4859c this fixes the probe handler to reflect that it doesn't care about the path (# 963)
  > b321831 upgrade to latest dependencies (# 962)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Apr 11, 2024
1 parent 1013dc1 commit 6172e77
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
knative.dev/hack v0.0.0-20240404013450-1133b37da8d7
knative.dev/networking v0.0.0-20240410133143-200296131672
knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2
knative.dev/pkg v0.0.0-20240409141558-1ff9a77566f6
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20240404013450-1133b37da8d7 h1:fkWYWvdHm1mVHevKW2vVJnZtxH0NzOlux8imesweKwE=
knative.dev/hack v0.0.0-20240404013450-1133b37da8d7/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20240410133143-200296131672 h1:BGHRJN0RzLbB+HMUUUDWLd5ShzLRl+Pk1OV6mMQCqCs=
knative.dev/networking v0.0.0-20240410133143-200296131672/go.mod h1:m9aH65g5JGuwhH6moqAmF0+X6PvIQwElVx5dw2+jDno=
knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2 h1:W8M/cxPYUOIjNcwQ3w2Il/qlYKpZBPJ89ysTr5MTI/A=
knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2/go.mod h1:yXbBRuzGKDkHSdvqUT7/1j9br5gkJL9LAyxpHfcF3h8=
knative.dev/pkg v0.0.0-20240409141558-1ff9a77566f6 h1:jJVStFc+y8c7veKYDyQFwQTod+w5pzZqopz/nLH2dJo=
knative.dev/pkg v0.0.0-20240409141558-1ff9a77566f6/go.mod h1:ZWUA+Z6zFI93VyExtnH0P5JtVQ0TvWpKvbxtFvmRJ9I=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func WaitForCertificateSecret(ctx context.Context, t *testing.T, client *test.Cl
span := logging.GetEmitableSpan(context.Background(), fmt.Sprintf("WaitForCertificateSecret/%s/%s", cert.Spec.SecretName, desc))
defer span.End()

return wait.PollImmediate(test.PollInterval, test.PollTimeout, func() (bool, error) {
return wait.PollUntilContextTimeout(ctx, test.PollInterval, test.PollTimeout, true, func(ctx context.Context) (bool, error) {
secret, err := client.KubeClient.CoreV1().Secrets(test.ServingNamespace).Get(ctx, cert.Spec.SecretName, metav1.GetOptions{})
if apierrs.IsNotFound(err) {
return false, nil
Expand Down Expand Up @@ -119,7 +119,7 @@ func WaitForCertificateState(ctx context.Context, client *test.NetworkingClients
defer span.End()

var lastState *v1alpha1.Certificate
return wait.PollImmediate(test.PollInterval, test.PollTimeout, func() (bool, error) {
return wait.PollUntilContextTimeout(ctx, test.PollInterval, test.PollTimeout, true, func(ctx context.Context) (bool, error) {
var err error
lastState, err = client.Certificates.Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/networking/test/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func WaitForIngressState(ctx context.Context, client *NetworkingClients, name st
defer span.End()

var lastState *v1alpha1.Ingress
waitErr := wait.PollImmediate(PollInterval, PollTimeout, func() (bool, error) {
waitErr := wait.PollUntilContextTimeout(ctx, PollInterval, PollTimeout, true, func(ctx context.Context) (bool, error) {
var err error
lastState, err = client.Ingresses.Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ import (
"strings"

nethttp "knative.dev/networking/pkg/http"
"knative.dev/networking/pkg/http/probe"
"knative.dev/pkg/network"
)

// InitHandlers initializes all handlers.
func InitHandlers(mux *http.ServeMux) {
mux.HandleFunc("/", withHeaders(withRequestLog(runtimeHandler)))

h := probe.NewHandler(withRequestLog(withKubeletProbeHeaderCheck))
mux.HandleFunc(nethttp.HealthCheckPath, h.ServeHTTP)
mux.HandleFunc(nethttp.HealthCheckPath, withRequestLog(withKubeletProbeHeaderCheck))
}

// withRequestLog logs each request before handling it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"net/http"
"os"

"knative.dev/networking/pkg/http/probe"
"knative.dev/networking/test"
"knative.dev/networking/test/test_images/runtime/handlers"
)
Expand All @@ -48,11 +49,13 @@ func main() {
mux := http.NewServeMux()
handlers.InitHandlers(mux)

h := probe.NewHandler(mux)

if cert, key := os.Getenv("CERT"), os.Getenv("KEY"); cert != "" && key != "" {
log.Print("Server starting on port with TLS ", port)
test.ListenAndServeTLSGracefullyWithHandler(cert, key, ":"+port, mux)
test.ListenAndServeTLSGracefullyWithHandler(cert, key, ":"+port, h)
} else {
log.Print("Server starting on port ", port)
test.ListenAndServeGracefullyWithHandler(":"+port, mux)
test.ListenAndServeGracefullyWithHandler(":"+port, h)
}
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20240404013450-1133b37da8d7
## explicit; go 1.18
knative.dev/hack
# knative.dev/networking v0.0.0-20240410133143-200296131672
# knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2
## explicit; go 1.21
knative.dev/networking/config
knative.dev/networking/pkg/apis/networking
Expand Down

0 comments on commit 6172e77

Please sign in to comment.