Skip to content

Commit

Permalink
Do not log registrations to prevent mapping explosion (#7869)
Browse files Browse the repository at this point in the history
* Do not log registrations to prevent mapping explosion
  • Loading branch information
barkbay authored Jun 4, 2024
1 parent e5c856f commit 95abada
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
74 changes: 37 additions & 37 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/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
Expand Down Expand Up @@ -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/[email protected]/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
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/dependencies.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion pkg/controller/common/watches/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 95abada

Please sign in to comment.