From ff4d44c15e5532bd3c3c1289832b06e7d1e7c73e Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 6 May 2026 13:57:00 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/pkg ec45287...021ad70: > 021ad70 expose defaultMinimumVersion and getMinimumVersion (# 3352) > ea2b25f Bump go.uber.org/zap from 1.27.1 to 1.28.0 (# 3351) > 7a25a8d export MinimumVersion() accessor (# 3350) > 1614dac Update community files (# 3349) bumping go.uber.org/zap 7b755a3...5b81b37: > 5b81b37 release v1.28.0 (# 1547) > 0ab0d5a zapcore: Add PreWriteHook for transforming entries before write (# 1534) > d278c59 [chore] CI: test on Go 1.26 (# 1535) > 16fb16b chore(dep): replace archived gopkg.in/yaml.v3 with officially maintained go.yaml.in/yaml/v3 (# 1522) bumping knative.dev/hack aeb7b4a...b2a37f1: > b2a37f1 Update community files (# 474) bumping knative.dev/eventing d94504a...5a46719: > 5a46719 [Automated] Update eventing-eventing-integrations nightly (# 9084) > 3a5fc78 [main] Upgrade to latest dependencies (# 9083) > 23fbca1 build(deps): bump chainguard-dev/actions from 1.6.16 to 1.6.18 in the github-actions group (# 9082) Signed-off-by: Knative Automation --- go.mod | 8 +++--- go.sum | 16 ++++++------ vendor/go.uber.org/zap/CHANGELOG.md | 4 +++ vendor/go.uber.org/zap/zapcore/entry.go | 32 ++++++++++++++++++++++- vendor/knative.dev/pkg/version/version.go | 15 ++++++++--- vendor/modules.txt | 8 +++--- 6 files changed, 62 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index ceb1c32fb..5366bdfc2 100644 --- a/go.mod +++ b/go.mod @@ -8,13 +8,13 @@ require ( github.com/hashicorp/golang-lru v1.0.2 github.com/kelseyhightower/envconfig v1.4.0 github.com/stretchr/testify v1.11.1 - go.uber.org/zap v1.27.1 + go.uber.org/zap v1.28.0 k8s.io/api v0.35.4 k8s.io/apimachinery v0.35.4 k8s.io/client-go v0.35.4 - knative.dev/eventing v0.49.0 - knative.dev/hack v0.0.0-20260421155212-aeb7b4a9bf96 - knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1 + knative.dev/eventing v0.49.1-0.20260506130425-5a46719f32de + knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b + knative.dev/pkg v0.0.0-20260505204821-021ad709ec68 ) require ( diff --git a/go.sum b/go.sum index 3b45a4631..23de8e781 100644 --- a/go.sum +++ b/go.sum @@ -212,8 +212,8 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= -go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= +go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= @@ -348,12 +348,12 @@ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/eventing v0.49.0 h1:Gole9D1AXnZVBCzoqO00/5n8MApy8rRJpTHYXvUFfQc= -knative.dev/eventing v0.49.0/go.mod h1:5lsUu0xHPLQpfVW7kmYXB7uRCUOnGGPsE87rx3hrRsM= -knative.dev/hack v0.0.0-20260421155212-aeb7b4a9bf96 h1:YrpWTCDRzoGz0Fe7AcLTsBY+D5vx0ijhuxEVl0z3Xyw= -knative.dev/hack v0.0.0-20260421155212-aeb7b4a9bf96/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= -knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1 h1:bO5X2bugzMqoVltm2n16mHpAdpSR0HRWeAKzHUL2Cgk= -knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1/go.mod h1:EZeB2nBW4QcpZuCPB5a/UnoVIH2N+5z5fwNw1PUeqMg= +knative.dev/eventing v0.49.1-0.20260506130425-5a46719f32de h1:IMqOe0mpAq3hsLsO4vJ5QhT/a6A+sO498mQZ8YiUrxw= +knative.dev/eventing v0.49.1-0.20260506130425-5a46719f32de/go.mod h1:uH3Qh1gRhNPoO/hidrGp36gyl21m5wtuqiahNlrVXI4= +knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b h1:MvbV2F2BdI8qKrYYUhDwbUZbX0BAYRSIpXM2TOtTvs0= +knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= +knative.dev/pkg v0.0.0-20260505204821-021ad709ec68 h1:cZz3AkOusfsFBJCOKiCiadBbHjbEiqlsu/55gzRhPZM= +knative.dev/pkg v0.0.0-20260505204821-021ad709ec68/go.mod h1:JM+8ds+MTBtPK2aCp6pGUHQx9gNIL8wuMhqr0sxtDog= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= diff --git a/vendor/go.uber.org/zap/CHANGELOG.md b/vendor/go.uber.org/zap/CHANGELOG.md index 86e7e6f98..53848733c 100644 --- a/vendor/go.uber.org/zap/CHANGELOG.md +++ b/vendor/go.uber.org/zap/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.28.0 (27 Apr 2026) +Enhancements: +* [#1534][]: Add `zapcore.CheckPreWriteHook` and `CheckedEntry.Before` method for transforming entries before they are written to any Cores. + ## 1.27.1 (19 Nov 2025) Enhancements: * [#1501][]: prevent `Object` from panicking on nils diff --git a/vendor/go.uber.org/zap/zapcore/entry.go b/vendor/go.uber.org/zap/zapcore/entry.go index 841752f2e..e1fc07a1f 100644 --- a/vendor/go.uber.org/zap/zapcore/entry.go +++ b/vendor/go.uber.org/zap/zapcore/entry.go @@ -201,6 +201,14 @@ func (a CheckWriteAction) OnWrite(ce *CheckedEntry, _ []Field) { var _ CheckWriteHook = CheckWriteAction(0) +// CheckPreWriteHook is a function that transforms an Entry and its Fields +// before they are written to cores. Register one on a CheckedEntry with the +// Before method. +// +// Pre-write hooks run in the order they were added, before any Core's Write +// method is called. They may modify the Entry and Fields freely. +type CheckPreWriteHook func(Entry, []Field) (Entry, []Field) + // CheckedEntry is an Entry together with a collection of Cores that have // already agreed to log it. // @@ -213,6 +221,7 @@ type CheckedEntry struct { dirty bool // best-effort detection of pool misuse after CheckWriteHook cores []Core + before []CheckPreWriteHook } func (ce *CheckedEntry) reset() { @@ -225,6 +234,10 @@ func (ce *CheckedEntry) reset() { ce.cores[i] = nil } ce.cores = ce.cores[:0] + for i := range ce.before { + ce.before[i] = nil + } + ce.before = ce.before[:0] } // Write writes the entry to the stored Cores, returns any errors, and returns @@ -253,9 +266,14 @@ func (ce *CheckedEntry) Write(fields ...Field) { } ce.dirty = true + ent := ce.Entry + for i := range ce.before { + ent, fields = ce.before[i](ent, fields) + } + var err error for i := range ce.cores { - err = multierr.Append(err, ce.cores[i].Write(ce.Entry, fields)) + err = multierr.Append(err, ce.cores[i].Write(ent, fields)) } if err != nil && ce.ErrorOutput != nil { _, _ = fmt.Fprintf( @@ -295,6 +313,18 @@ func (ce *CheckedEntry) Should(ent Entry, should CheckWriteAction) *CheckedEntry return ce.After(ent, should) } +// Before adds a pre-write hook that transforms the Entry and Fields before +// they are written to any registered Cores. Multiple hooks run in the order +// they were added. It's safe to call this on nil CheckedEntry references. +func (ce *CheckedEntry) Before(ent Entry, hook CheckPreWriteHook) *CheckedEntry { + if ce == nil { + ce = getCheckedEntry() + ce.Entry = ent + } + ce.before = append(ce.before, hook) + return ce +} + // After sets this CheckEntry's CheckWriteHook, which will be called after this // log entry has been written. It's safe to call this on nil CheckedEntry // references. diff --git a/vendor/knative.dev/pkg/version/version.go b/vendor/knative.dev/pkg/version/version.go index 362edd821..90a6d5a83 100644 --- a/vendor/knative.dev/pkg/version/version.go +++ b/vendor/knative.dev/pkg/version/version.go @@ -33,14 +33,21 @@ const ( // NOTE: If you are changing this line, please also update the minimum kubernetes // version listed here: // https://github.com/knative/docs/blob/main/docs/snippets/prerequisites.md - defaultMinimumVersion = "v1.34.0" + + // DefaultKubernetesMinVersion is the default minimum Kubernetes version + // Knative is built and tested against. The value has a leading "v" + // (e.g. "v1.34.0"). + DefaultKubernetesMinVersion = "v1.34.0" ) -func getMinimumVersion() string { +// KubernetesMinimumVersion returns the minimum Kubernetes version required by +// Knative. It returns the value of the KUBERNETES_MIN_VERSION environment +// variable if set, otherwise DefaultKubernetesMinVersion. +func KubernetesMinimumVersion() string { if v := os.Getenv(KubernetesMinVersionKey); v != "" { return v } - return defaultMinimumVersion + return DefaultKubernetesMinVersion } // CheckMinimumVersion checks if the currently installed version of @@ -59,7 +66,7 @@ func CheckMinimumVersion(versioner discovery.ServerVersionInterface) error { if err != nil { return err } - minimumVersion, err := semver.Make(normalizeVersion(getMinimumVersion())) + minimumVersion, err := semver.Make(normalizeVersion(KubernetesMinimumVersion())) if err != nil { return err } diff --git a/vendor/modules.txt b/vendor/modules.txt index 27fbf85e9..96aab77ce 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -337,7 +337,7 @@ go.uber.org/automaxprocs/maxprocs # go.uber.org/multierr v1.11.0 ## explicit; go 1.19 go.uber.org/multierr -# go.uber.org/zap v1.27.1 +# go.uber.org/zap v1.28.0 ## explicit; go 1.19 go.uber.org/zap go.uber.org/zap/buffer @@ -1095,7 +1095,7 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/trace -# knative.dev/eventing v0.49.0 +# knative.dev/eventing v0.49.1-0.20260506130425-5a46719f32de ## explicit; go 1.25.0 knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/util/crstatusevent @@ -1126,10 +1126,10 @@ knative.dev/eventing/pkg/observability/configmap knative.dev/eventing/pkg/observability/otel knative.dev/eventing/pkg/reconciler/source knative.dev/eventing/pkg/utils -# knative.dev/hack v0.0.0-20260421155212-aeb7b4a9bf96 +# knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b ## explicit; go 1.24 knative.dev/hack -# knative.dev/pkg v0.0.0-20260422015212-ec452872dcc1 +# knative.dev/pkg v0.0.0-20260505204821-021ad709ec68 ## explicit; go 1.25.0 knative.dev/pkg/apis knative.dev/pkg/apis/duck