From 7a245f1f97f8d94819b695f594119d0a4424a97d Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 6 May 2026 01:59:13 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/eventing d94504a...23fbca1: > 23fbca1 build(deps): bump chainguard-dev/actions from 1.6.16 to 1.6.18 in the github-actions group (# 9082) 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/serving 370ad5a...3d28fb8: > 3d28fb8 drop unnecessary workflow (# 16584) > 4741565 Bump the github-actions group with 3 updates (# 16583) bumping knative.dev/hack aeb7b4a...b2a37f1: > b2a37f1 Update community files (# 474) 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) Signed-off-by: Knative Automation --- go.mod | 10 +++---- go.sum | 20 +++++++------- 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 | 10 +++---- 6 files changed, 66 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 10cba9f5c..2e3774b53 100644 --- a/go.mod +++ b/go.mod @@ -8,17 +8,17 @@ require ( github.com/google/go-github/v31 v31.0.0 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 golang.org/x/oauth2 v0.35.0 gopkg.in/go-playground/webhooks.v5 v5.13.0 k8s.io/api v0.35.4 k8s.io/apimachinery v0.35.4 k8s.io/client-go v0.35.4 k8s.io/code-generator 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/serving v0.49.0 + knative.dev/eventing v0.49.1-0.20260504114613-23fbca18994b + knative.dev/hack v0.0.0-20260428014158-b2a37f1b6e7b + knative.dev/pkg v0.0.0-20260505204821-021ad709ec68 + knative.dev/serving v0.49.1-0.20260504070613-3d28fb878e74 ) require ( diff --git a/go.sum b/go.sum index 7108d699f..dbd082063 100644 --- a/go.sum +++ b/go.sum @@ -223,8 +223,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= @@ -364,16 +364,16 @@ 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/eventing v0.49.1-0.20260504114613-23fbca18994b h1:th2HE08avQTCgnPYN9KiOvIISqWiTuCJ6Fet6WglHKA= +knative.dev/eventing v0.49.1-0.20260504114613-23fbca18994b/go.mod h1:5lsUu0xHPLQpfVW7kmYXB7uRCUOnGGPsE87rx3hrRsM= +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/networking v0.0.0-20260422140718-e9578ef11562 h1:3roePSDRNthOFDxwTISYPt2IYEXXVramzpHnH0NMGYs= knative.dev/networking v0.0.0-20260422140718-e9578ef11562/go.mod h1:aQO2gITPzLwMPCV9S57rHrb1Zt2mUAYSGLbb/7nqzW0= -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/serving v0.49.0 h1:5B1JsytwZ+5bh9vOCNnu4GQJ/m6oj61Z/rVKziAY6MA= -knative.dev/serving v0.49.0/go.mod h1:KXvVnXohxsbE3rCRbr1TZlxeC20qIzhVckDwbsgLWPI= +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= +knative.dev/serving v0.49.1-0.20260504070613-3d28fb878e74 h1:rt3Hguyh3lWD1U9p7k1LWl9V9L2egRAnAZf4d0wJkdU= +knative.dev/serving v0.49.1-0.20260504070613-3d28fb878e74/go.mod h1:KXvVnXohxsbE3rCRbr1TZlxeC20qIzhVckDwbsgLWPI= 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 52b96e9af..97ac78365 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -348,7 +348,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 @@ -1126,7 +1126,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.20260504114613-23fbca18994b ## explicit; go 1.25.0 knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -1194,7 +1194,7 @@ knative.dev/eventing/pkg/observability knative.dev/eventing/pkg/observability/configmap knative.dev/eventing/pkg/observability/otel 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/networking v0.0.0-20260422140718-e9578ef11562 @@ -1202,7 +1202,7 @@ knative.dev/hack knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 knative.dev/networking/pkg/config -# 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 @@ -1281,7 +1281,7 @@ knative.dev/pkg/webhook/psbinding knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.49.0 +# knative.dev/serving v0.49.1-0.20260504070613-3d28fb878e74 ## explicit; go 1.25.0 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1