Skip to content

Commit 123f0f5

Browse files
upgrade to latest dependencies (#1649)
bumping knative.dev/hack af735b2...50b120a: > 50b120a bump gotestfmt to newest version (# 449) > f2be520 [release-1.19] 🐛 Fix knative.dev/toolbox for older versions of Golang (# 444) bumping knative.dev/eventing 931f60b...f53c251: > f53c251 [release-1.19] fix typo [skip-dot-release] (# 8743) > 5e02349 [release-1.19] Upgrade to latest dependencies (# 8720) > 49edf43 [release-1.19] Fix mt-broker-ingress auth to work with structured event too (# 8713) bumping knative.dev/reconciler-test 67ad192...624cba8: > 624cba8 Update default ko version to 0.18.0 (# 837) > b4a9751 upgrade to latest dependencies (# 835) > 2f11b06 upgrade to latest dependencies (# 834) bumping knative.dev/pkg 077dcf0...4ebd86b: > 4ebd86b upgrade to latest dependencies (# 3282) > 7da1174 upgrade to latest dependencies (# 3281) > 2be9d56 Lock before iterating map so that code does not panic on concurrent write (# 3279) Signed-off-by: Knative Automation <[email protected]>
1 parent 16911ca commit 123f0f5

File tree

10 files changed

+65
-52
lines changed

10 files changed

+65
-52
lines changed

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ require (
2020
k8s.io/client-go v0.33.4
2121
k8s.io/code-generator v0.33.4
2222
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
23-
knative.dev/eventing v0.46.4
24-
knative.dev/hack v0.0.0-20250902154142-af735b2738d6
25-
knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8
26-
knative.dev/reconciler-test v0.0.0-20250912162922-67ad19295884
23+
knative.dev/eventing v0.46.6
24+
knative.dev/hack v0.0.0-20251022160748-50b120a65f30
25+
knative.dev/pkg v0.0.0-20251022162148-4ebd86bc2d85
26+
knative.dev/reconciler-test v0.0.0-20251023120348-624cba8ba108
2727
sigs.k8s.io/controller-runtime v0.19.0
2828
)
2929

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,14 +1163,14 @@ k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUy
11631163
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
11641164
k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0=
11651165
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
1166-
knative.dev/eventing v0.46.4 h1:Kc3TiJzVJRvH/XE0zT14J1L+OgBykzYzobvCcit8jJE=
1167-
knative.dev/eventing v0.46.4/go.mod h1:KkMqluebpiT7TCXwqUfI0cG2EfZ8yjlapOlwOHYEnL4=
1168-
knative.dev/hack v0.0.0-20250902154142-af735b2738d6 h1:JYZgO9bni32T+BB5v6WpeRFm1hjj+EypBLZCk6HZBt0=
1169-
knative.dev/hack v0.0.0-20250902154142-af735b2738d6/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
1170-
knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8 h1:n0BMHXIem9MyDkK4vfA4Vzdxaf1e+EeLJ6k+8exCjjI=
1171-
knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8/go.mod h1:a1amDzo4YIUNuGeDgEz/uDHs5MQVYI1DXnRnEpWCAts=
1172-
knative.dev/reconciler-test v0.0.0-20250912162922-67ad19295884 h1:o+aMyv+92MK4B9BeXv3qAsSQRyO1Qx/HxggV+1aWh8Q=
1173-
knative.dev/reconciler-test v0.0.0-20250912162922-67ad19295884/go.mod h1:3BN2+QgyAHpbKEKephULEVNYyUsqx1QK/ALGOZhliTs=
1166+
knative.dev/eventing v0.46.6 h1:8htZletYsoC9rXDz4lbtsgGAAPc95CTpcV9jmACyRqA=
1167+
knative.dev/eventing v0.46.6/go.mod h1:dIWODSwvwagsvXxcsBiOtaL3Zr2svaegjpCvW0IfBFk=
1168+
knative.dev/hack v0.0.0-20251022160748-50b120a65f30 h1:4fzUJrTmIbqgttXMBuLFC7/m2p0146EM3h9Wn2pBm9U=
1169+
knative.dev/hack v0.0.0-20251022160748-50b120a65f30/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
1170+
knative.dev/pkg v0.0.0-20251022162148-4ebd86bc2d85 h1:6cFtFO8JE0AiY66BphR3taXbqdTlupFF69lL/0EhrSE=
1171+
knative.dev/pkg v0.0.0-20251022162148-4ebd86bc2d85/go.mod h1:riEe6VGLodQ/KC4zWRnOqE6Lo5/CkKfwW/RQmNUPltU=
1172+
knative.dev/reconciler-test v0.0.0-20251023120348-624cba8ba108 h1:TtUzomlP3ZdcnSzTEvICDKJrngpZF5yy2FzlxLnBL0U=
1173+
knative.dev/reconciler-test v0.0.0-20251023120348-624cba8ba108/go.mod h1:n81D9QPYPKvjpVkxYpvfwRX9VWOVtCtBzni3ZRpOkrw=
11741174
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
11751175
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
11761176
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

vendor/knative.dev/eventing/pkg/apis/eventing/v1alpha1/requestreply_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
// +genreconciler
3333
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
3434

35-
// RequestRepluy represents synchronous interface to sending and receiving events from a Broker.
35+
// RequestReply represents synchronous interface to sending and receiving events from a Broker.
3636
type RequestReply struct {
3737
metav1.TypeMeta `json:",inline"`
3838
// +optional

vendor/knative.dev/eventing/pkg/auth/verifier.go

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package auth
1818

1919
import (
20-
"bytes"
2120
"context"
2221
"encoding/json"
2322
"fmt"
@@ -32,6 +31,7 @@ import (
3231
"go.opentelemetry.io/otel"
3332
corev1listers "k8s.io/client-go/listers/core/v1"
3433
"knative.dev/eventing/pkg/eventingtls"
34+
"knative.dev/eventing/pkg/utils"
3535
"knative.dev/pkg/configmap"
3636
"knative.dev/pkg/network"
3737
"knative.dev/pkg/observability/tracing"
@@ -161,7 +161,7 @@ func (v *Verifier) verifyAuthN(ctx context.Context, audience *string, req *http.
161161
// verifyAuthZ verifies if the given idToken is allowed by the resources eventPolicyStatus
162162
func (v *Verifier) verifyAuthZ(ctx context.Context, features feature.Flags, idToken *IDToken, resourceNamespace string, policyRefs []duckv1.AppliedEventPolicyRef, req *http.Request, resp http.ResponseWriter) error {
163163
if len(policyRefs) > 0 {
164-
req, err := copyRequest(req)
164+
req, err := utils.CopyRequest(req)
165165
if err != nil {
166166
resp.WriteHeader(http.StatusInternalServerError)
167167
return fmt.Errorf("failed to copy request body: %w", err)
@@ -335,35 +335,6 @@ func (v *Verifier) getKubernetesOIDCDiscovery(features feature.Flags, client *ht
335335
return openIdConfig, nil
336336
}
337337

338-
// copyRequest makes a copy of the http request which can be consumed as needed, leaving the original request
339-
// able to be consumed as well.
340-
func copyRequest(req *http.Request) (*http.Request, error) {
341-
// check if we actually need to copy the body, otherwise we can return the original request
342-
if req.Body == nil || req.Body == http.NoBody {
343-
return req, nil
344-
}
345-
346-
var buf bytes.Buffer
347-
if _, err := buf.ReadFrom(req.Body); err != nil {
348-
return nil, fmt.Errorf("failed to read request body while copying it: %w", err)
349-
}
350-
351-
if err := req.Body.Close(); err != nil {
352-
return nil, fmt.Errorf("failed to close original request body ready while copying request: %w", err)
353-
}
354-
355-
// set the original request body to be readable again
356-
req.Body = io.NopCloser(&buf)
357-
358-
// return a new request with a readable body and same headers as the original
359-
// we don't need to set any other fields as cloudevents only uses the headers
360-
// and body to construct the Message/Event.
361-
return &http.Request{
362-
Header: req.Header,
363-
Body: io.NopCloser(bytes.NewReader(buf.Bytes())),
364-
}, nil
365-
}
366-
367338
type openIDMetadata struct {
368339
Issuer string `json:"issuer"`
369340
JWKSURI string `json:"jwks_uri"`

vendor/knative.dev/eventing/pkg/utils/utils.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ limitations under the License.
1717
package utils
1818

1919
import (
20+
"bytes"
21+
"fmt"
22+
"io"
23+
"net/http"
2024
"regexp"
2125
"strings"
2226

@@ -91,3 +95,32 @@ func GenerateFixedName(owner metav1.Object, prefix string) string {
9195
// A dot must be followed by [a-z0-9] to be DNS1123 compliant. Make sure we are not joining a dot and a dash.
9296
return strings.TrimSuffix(prefix, ".") + uid
9397
}
98+
99+
// CopyRequest makes a copy of the http request which can be consumed as needed, leaving the original request
100+
// able to be consumed as well.
101+
func CopyRequest(req *http.Request) (*http.Request, error) {
102+
// check if we actually need to copy the body, otherwise we can return the original request
103+
if req.Body == nil || req.Body == http.NoBody {
104+
return req, nil
105+
}
106+
107+
var buf bytes.Buffer
108+
if _, err := buf.ReadFrom(req.Body); err != nil {
109+
return nil, fmt.Errorf("failed to read request body while copying it: %w", err)
110+
}
111+
112+
if err := req.Body.Close(); err != nil {
113+
return nil, fmt.Errorf("failed to close original request body ready while copying request: %w", err)
114+
}
115+
116+
// set the original request body to be readable again
117+
req.Body = io.NopCloser(&buf)
118+
119+
// return a new request with a readable body and same headers as the original
120+
// we don't need to set any other fields as cloudevents only uses the headers
121+
// and body to construct the Message/Event.
122+
return &http.Request{
123+
Header: req.Header,
124+
Body: io.NopCloser(bytes.NewReader(buf.Bytes())),
125+
}, nil
126+
}

vendor/knative.dev/hack/library.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function report_go_test() {
588588
logfile="${logfile/.xml/.jsonl}"
589589
echo "Running go test with args: ${go_test_args[*]}"
590590
local gotest_retcode=0
591-
go_run gotest.tools/gotestsum@v1.11.0 \
591+
go_run gotest.tools/gotestsum@v1.13.0 \
592592
--format "${GO_TEST_VERBOSITY:-testname}" \
593593
--junitfile "${xml}" \
594594
--junitfile-testsuite-name relative \
@@ -681,7 +681,7 @@ function start_knative_eventing_extension() {
681681
# Parameters: $1 - tool package for go run.
682682
# $2..$n - parameters passed to the tool.
683683
function go_run() {
684-
local package
684+
local package gotoolchain
685685
package="$1"
686686
if [[ "$package" != *@* ]]; then
687687
abort 'Package for "go_run" needs to have @version'
@@ -696,6 +696,11 @@ function go_run() {
696696
GORUN_PATH="$(mktemp -t -d -u gopath.XXXXXXXX)"
697697
fi
698698
export GORUN_PATH
699+
gotoolchain="$(go env GOTOOLCHAIN)"
700+
if [[ "$package" == knative.dev/toolbox/* ]]; then
701+
gotoolchain=auto
702+
fi
703+
GOTOOLCHAIN="${gotoolchain}" \
699704
GOPATH="${GORUN_PATH}" \
700705
GOFLAGS='' \
701706
go run "$package" "$@"

vendor/knative.dev/hack/presubmit-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function __build_test_runner_for_module() {
141141
# Don't merge these two lines, or return code will always be 0.
142142
# Get all build tags in go code (ignore /vendor, /hack and /third_party)
143143
local tags
144-
tags="$(go run knative.dev/toolbox/go-ls-tags@latest --joiner=,)"
144+
tags="$(go_run knative.dev/toolbox/go-ls-tags@latest --joiner=,)"
145145
local go_pkg_dirs
146146
go_pkg_dirs="$(go list -tags "${tags}" ./...)" || return $?
147147
if [[ -z "${go_pkg_dirs}" ]]; then

vendor/knative.dev/pkg/controller/queue_metrics.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ func (m *queueMetrics) updateUnfinishedWork() {
121121
// doesn't seem to have non-hacky ways to reset the summary metrics.
122122
var total float64
123123
var oldest float64
124+
125+
m.mu.Lock()
126+
defer m.mu.Unlock()
127+
124128
for _, t := range m.processingStartTimes {
125129
age := m.sinceInSeconds(t)
126130
total += age

vendor/knative.dev/reconciler-test/pkg/images/ko/publish.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var ErrKoPublishFailed = errors.New("ko publish failed")
3030
func Publish(ctx context.Context, path string) (string, error) {
3131
version := os.Getenv("GOOGLE_KO_VERSION")
3232
if version == "" {
33-
version = "v0.15.2"
33+
version = "v0.18.0"
3434
}
3535
args := []string{
3636
"go", "run", fmt.Sprintf("github.com/google/ko@%s", version),

vendor/modules.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ k8s.io/utils/net
12431243
k8s.io/utils/pointer
12441244
k8s.io/utils/ptr
12451245
k8s.io/utils/trace
1246-
# knative.dev/eventing v0.46.4
1246+
# knative.dev/eventing v0.46.6
12471247
## explicit; go 1.24.0
12481248
knative.dev/eventing/cmd/heartbeats
12491249
knative.dev/eventing/pkg/adapter/v2
@@ -1379,10 +1379,10 @@ knative.dev/eventing/test/rekt/resources/trigger
13791379
knative.dev/eventing/test/test_images
13801380
knative.dev/eventing/test/test_images/event-sender
13811381
knative.dev/eventing/test/test_images/print
1382-
# knative.dev/hack v0.0.0-20250902154142-af735b2738d6
1382+
# knative.dev/hack v0.0.0-20251022160748-50b120a65f30
13831383
## explicit; go 1.21
13841384
knative.dev/hack
1385-
# knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8
1385+
# knative.dev/pkg v0.0.0-20251022162148-4ebd86bc2d85
13861386
## explicit; go 1.24.0
13871387
knative.dev/pkg/apis
13881388
knative.dev/pkg/apis/duck
@@ -1497,7 +1497,7 @@ knative.dev/pkg/webhook/json
14971497
knative.dev/pkg/webhook/resourcesemantics
14981498
knative.dev/pkg/webhook/resourcesemantics/defaulting
14991499
knative.dev/pkg/webhook/resourcesemantics/validation
1500-
# knative.dev/reconciler-test v0.0.0-20250912162922-67ad19295884
1500+
# knative.dev/reconciler-test v0.0.0-20251023120348-624cba8ba108
15011501
## explicit; go 1.24.0
15021502
knative.dev/reconciler-test/cmd/eventshub
15031503
knative.dev/reconciler-test/pkg/environment

0 commit comments

Comments
 (0)