From f1cb1eaee295c7647b6ab6ef579cdc37a3b40cdc Mon Sep 17 00:00:00 2001 From: Michael Morello Date: Tue, 4 Jun 2024 09:49:54 +0200 Subject: [PATCH 1/2] Do not log registrations to prevent mapping explosion --- pkg/controller/common/watches/handler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/controller/common/watches/handler.go b/pkg/controller/common/watches/handler.go index 2b95acaf4e..4b88015aaa 100644 --- a/pkg/controller/common/watches/handler.go +++ b/pkg/controller/common/watches/handler.go @@ -8,6 +8,8 @@ import ( "context" "sync" + "golang.org/x/exp/maps" + "k8s.io/client-go/util/workqueue" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" @@ -60,7 +62,7 @@ func (d *DynamicEnqueueRequest[T]) AddHandler(handler HandlerRegistration[T]) er _, exists := d.registrations[handler.Key()] if !exists { - log.V(1).Info("Adding new handler registration", "key", handler.Key(), "current_registrations", d.registrations) + log.V(1).Info("Adding new handler registration", "key", handler.Key(), "current_registrations_keys", maps.Keys(d.registrations)) } d.registrations[handler.Key()] = handler return nil From b92ff052eb80d9a750cf7d4125a71227a8adb481 Mon Sep 17 00:00:00 2001 From: Michael Morello Date: Tue, 4 Jun 2024 10:03:27 +0200 Subject: [PATCH 2/2] make generate --- NOTICE.txt | 74 ++++++++++++++-------------- docs/reference/dependencies.asciidoc | 2 +- go.mod | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 036531221c..9618c89449 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -3850,6 +3850,43 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +Module : golang.org/x/exp +Version : v0.0.0-20240506185415-9bf2ced13842 +Time : 2024-05-06T18:54:15Z +Licence : BSD-3-Clause + +Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/LICENSE: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + -------------------------------------------------------------------------------- Module : gopkg.in/yaml.v3 Version : v3.0.1 @@ -16053,43 +16090,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------- -Module : golang.org/x/exp -Version : v0.0.0-20240506185415-9bf2ced13842 -Time : 2024-05-06T18:54:15Z -Licence : BSD-3-Clause - -Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240506185415-9bf2ced13842/LICENSE: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -------------------------------------------------------------------------------- Module : golang.org/x/mod Version : v0.17.0 diff --git a/docs/reference/dependencies.asciidoc b/docs/reference/dependencies.asciidoc index 308969783c..37565aa4f1 100644 --- a/docs/reference/dependencies.asciidoc +++ b/docs/reference/dependencies.asciidoc @@ -51,6 +51,7 @@ This page lists the third-party dependencies used to build {n}. | link:https://go.uber.org/automaxprocs[$$go.uber.org/automaxprocs$$] | v1.5.3 | MIT | link:https://go.uber.org/zap[$$go.uber.org/zap$$] | v1.27.0 | MIT | link:https://golang.org/x/crypto[$$golang.org/x/crypto$$] | v0.23.0 | BSD-3-Clause +| link:https://golang.org/x/exp[$$golang.org/x/exp$$] | v0.0.0-20240506185415-9bf2ced13842 | BSD-3-Clause | link:https://gopkg.in/yaml.v3[$$gopkg.in/yaml.v3$$] | v3.0.1 | MIT | link:https://github.com/kubernetes/api[$$k8s.io/api$$] | v0.30.1 | Apache-2.0 | link:https://github.com/kubernetes/apimachinery[$$k8s.io/apimachinery$$] | v0.30.1 | Apache-2.0 @@ -161,7 +162,6 @@ This page lists the third-party dependencies used to build {n}. | link:https://go.elastic.co/fastjson[$$go.elastic.co/fastjson$$] | v1.3.0 | MIT | link:https://go.uber.org/goleak[$$go.uber.org/goleak$$] | v1.3.0 | MIT | link:https://go.uber.org/multierr[$$go.uber.org/multierr$$] | v1.11.0 | MIT -| link:https://golang.org/x/exp[$$golang.org/x/exp$$] | v0.0.0-20240506185415-9bf2ced13842 | BSD-3-Clause | link:https://golang.org/x/mod[$$golang.org/x/mod$$] | v0.17.0 | BSD-3-Clause | link:https://golang.org/x/net[$$golang.org/x/net$$] | v0.25.0 | BSD-3-Clause | link:https://golang.org/x/oauth2[$$golang.org/x/oauth2$$] | v0.20.0 | BSD-3-Clause diff --git a/go.mod b/go.mod index 942e8850b0..7271044faa 100644 --- a/go.mod +++ b/go.mod @@ -35,6 +35,7 @@ require ( go.uber.org/automaxprocs v1.5.3 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.23.0 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.30.1 k8s.io/apimachinery v0.30.1 @@ -119,7 +120,6 @@ require ( github.com/vbatts/tar-split v0.11.3 // indirect go.elastic.co/fastjson v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect