Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 0f52db7...6cf4b05:
  > 6cf4b05 upgrade to latest dependencies (# 2841)
bumping knative.dev/reconciler-test 4b73d83...1bc30a7:
  > 1bc30a7 Update community files (# 584)
  > 922b219 Call the quit when the eventshub is closed (# 591)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Sep 29, 2023
1 parent 3dfc2ea commit 483540f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ require (
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2
knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263
knative.dev/hack/schema v0.0.0-20230926181829-f2f9b6f91263
knative.dev/pkg v0.0.0-20230926133247-0f52db700d63
knative.dev/reconciler-test v0.0.0-20230920080213-4b73d83f40fc
knative.dev/pkg v0.0.0-20230927121431-6cf4b051de4f
knative.dev/reconciler-test v0.0.0-20230928130937-1bc30a77ad78
sigs.k8s.io/yaml v1.3.0
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -848,10 +848,10 @@ knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263 h1:e6r9J1YopzSh6tDCpyKhVBfRU
knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/hack/schema v0.0.0-20230926181829-f2f9b6f91263 h1:STkde45JVGJdrrhEBudTxd2R4mY2fKqwlMtkkSxCV8g=
knative.dev/hack/schema v0.0.0-20230926181829-f2f9b6f91263/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0=
knative.dev/pkg v0.0.0-20230926133247-0f52db700d63 h1:L0O5LRuKFkdwuR+MrDLGjrXgaQv9+7xse+kC7EboshI=
knative.dev/pkg v0.0.0-20230926133247-0f52db700d63/go.mod h1:NzXHwtuwTWXyMD1KbL2ONwLk8cLROLYTtujCTTG7xQs=
knative.dev/reconciler-test v0.0.0-20230920080213-4b73d83f40fc h1:2pGUphOyniBD5nhJ/Xt6a72owZLZEpAfR3NXcTEGIu8=
knative.dev/reconciler-test v0.0.0-20230920080213-4b73d83f40fc/go.mod h1:i+/PWK/n3HPgjXMoj5U7CA6WRW/C3c3EfHCQ0FmrhNM=
knative.dev/pkg v0.0.0-20230927121431-6cf4b051de4f h1:+J5spRfGrMzQguNXkJlnyUK8yHoYtakUn6d1Z6Ulm/c=
knative.dev/pkg v0.0.0-20230927121431-6cf4b051de4f/go.mod h1:h2O9k9WkB10sVeYUHqywUJNN88y4jZMmu9nFwemwKAE=
knative.dev/reconciler-test v0.0.0-20230928130937-1bc30a77ad78 h1:1/VFdHjSG0J1WYu9/TzqIjR5a6igrP8pSDBnMdKQxZ8=
knative.dev/reconciler-test v0.0.0-20230928130937-1bc30a77ad78/go.mod h1:i+/PWK/n3HPgjXMoj5U7CA6WRW/C3c3EfHCQ0FmrhNM=
pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
Expand Down
6 changes: 4 additions & 2 deletions vendor/knative.dev/reconciler-test/pkg/eventshub/eventshub.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"golang.org/x/sync/errgroup"
"knative.dev/pkg/injection"
"knative.dev/pkg/logging"
"knative.dev/pkg/signals"
)

type envConfig struct {
Expand All @@ -39,8 +40,9 @@ type EventGeneratorStarter func(context.Context, *EventLogs) error
// Start starts a new eventshub process, with the provided factories.
// You can create your own eventshub providing event log factories and event generator factories.
func Start(eventLogFactories map[string]EventLogFactory, eventGeneratorFactories map[string]EventGeneratorStarter) {
//nolint // nil ctx is fine here, look at the code of EnableInjectionOrDie
ctx, _ := injection.EnableInjectionOrDie(nil, nil)
ctx := signals.NewContext()
defer maybeQuitIstioProxy(ctx) // quit at exit
ctx, _ = injection.EnableInjectionOrDie(ctx, nil)
ctx = ConfigureLogging(ctx, "eventshub")

tracer, err := ConfigureTracing(logging.FromContext(ctx), "")
Expand Down
38 changes: 38 additions & 0 deletions vendor/knative.dev/reconciler-test/pkg/eventshub/istio_quit.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2023 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
https://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 eventshub

import (
"context"
"errors"
"net/http"
"syscall"

"knative.dev/pkg/logging"
)

// maybeQuitIstioProxy shuts down Istio's proxy when available.
func maybeQuitIstioProxy(ctx context.Context) {
log := logging.FromContext(ctx)
req, _ := http.NewRequest(http.MethodPost, "http://localhost:15020/quitquitquit", nil)

_, err := http.DefaultClient.Do(req)

if err != nil && !errors.Is(err, syscall.ECONNREFUSED) {
log.Warn("Ignore this warning if Istio proxy is not used on this pod", err)
}
}
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,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-20230926133247-0f52db700d63
# knative.dev/pkg v0.0.0-20230927121431-6cf4b051de4f
## explicit; go 1.18
knative.dev/pkg/apiextensions/storageversion
knative.dev/pkg/apiextensions/storageversion/cmd/migrate
Expand Down Expand Up @@ -1324,7 +1324,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-20230920080213-4b73d83f40fc
# knative.dev/reconciler-test v0.0.0-20230928130937-1bc30a77ad78
## explicit; go 1.18
knative.dev/reconciler-test/cmd/eventshub
knative.dev/reconciler-test/pkg/environment
Expand Down

0 comments on commit 483540f

Please sign in to comment.