From 9e2ab65f97a1891dab29023394d398e58c73a173 Mon Sep 17 00:00:00 2001 From: "elastic-renovate-prod[bot]" <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 01:40:32 +0000 Subject: [PATCH 1/3] chore(deps): update go-dependencies --- dev-tools/go.mod | 2 +- go.mod | 4 ++-- go.sum | 12 ++++++------ internal/pkg/cache/impl_ristretto.go | 2 +- internal/pkg/es/client.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dev-tools/go.mod b/dev-tools/go.mod index 7116148d31..682a7fc4d7 100644 --- a/dev-tools/go.mod +++ b/dev-tools/go.mod @@ -23,7 +23,7 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/google/licenseclassifier v0.0.0-20250213175939-b5d1a3369749 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/jstemmer/go-junit-report v1.0.0 // indirect + github.com/jstemmer/go-junit-report/v2 v2.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect diff --git a/go.mod b/go.mod index 61e4b3c504..5b0cba177a 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.26.8 require ( github.com/Pallinder/go-randomdata v1.2.0 - github.com/cenkalti/backoff/v4 v4.3.0 - github.com/dgraph-io/ristretto v0.2.0 + github.com/cenkalti/backoff/v7 v7.0.0 + github.com/dgraph-io/ristretto/v2 v2.4.2 github.com/docker/go-units v0.5.0 github.com/elastic/elastic-agent-client/v7 v7.18.1 github.com/elastic/elastic-agent-libs v0.46.3 diff --git a/go.sum b/go.sum index 1b93e418fe..cbd3a911ae 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v7 v7.0.0 h1:ZP+QAaaOnVUHo+ufFpZ835hbT3x2fy+h2lecVEosZ6A= +github.com/cenkalti/backoff/v7 v7.0.0/go.mod h1:qcKBGwsu4hpxHtQ8tWYsQ+ifzx2+sS+Xx/3jfe30lI8= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= @@ -23,10 +23,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6N github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE= -github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgraph-io/ristretto/v2 v2.4.2 h1:x0cvjmUKxt764Yxdk2nr94we1AvPPAMh1rh5TQ+Jo80= +github.com/dgraph-io/ristretto/v2 v2.4.2/go.mod h1:0KsrXtXvnv0EqnzyowllbVJB8yBonswa2lTCK2gGo9E= +github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= +github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c= diff --git a/internal/pkg/cache/impl_ristretto.go b/internal/pkg/cache/impl_ristretto.go index 28f21d12a9..f0a3ba0f13 100644 --- a/internal/pkg/cache/impl_ristretto.go +++ b/internal/pkg/cache/impl_ristretto.go @@ -7,7 +7,7 @@ package cache import ( - "github.com/dgraph-io/ristretto" + "github.com/dgraph-io/ristretto/v2" "github.com/elastic/fleet-server/v7/internal/pkg/config" ) diff --git a/internal/pkg/es/client.go b/internal/pkg/es/client.go index 3e75fcf5ec..420721ad4b 100644 --- a/internal/pkg/es/client.go +++ b/internal/pkg/es/client.go @@ -21,7 +21,7 @@ import ( "github.com/elastic/fleet-server/v7/internal/pkg/config" "github.com/rs/zerolog" - backoff "github.com/cenkalti/backoff/v4" + backoff "github.com/cenkalti/backoff/v7" "github.com/elastic/go-elasticsearch/v8" ) From 0aa3a02da6c135fc338f7411ddb7486550fed165 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 31 Aug 2026 01:41:07 +0000 Subject: [PATCH 2/3] Post dependency update file modifications --- NOTICE-fips.txt | 12 ++++++------ NOTICE.txt | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/NOTICE-fips.txt b/NOTICE-fips.txt index 33677597ae..d9c5a8e3c7 100644 --- a/NOTICE-fips.txt +++ b/NOTICE-fips.txt @@ -10,12 +10,12 @@ Third party libraries used by the Elastic Beats project: -------------------------------------------------------------------------------- -Dependency : github.com/cenkalti/backoff/v4 -Version: v4.3.0 +Dependency : github.com/cenkalti/backoff/v7 +Version: v7.0.0 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/v4@v4.3.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/v7@v7.0.0/LICENSE: The MIT License (MIT) @@ -40,12 +40,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- -Dependency : github.com/dgraph-io/ristretto -Version: v0.2.0 +Dependency : github.com/dgraph-io/ristretto/v2 +Version: v2.4.2 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/dgraph-io/ristretto@v0.2.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/dgraph-io/ristretto/v2@v2.4.2/LICENSE: Apache License Version 2.0, January 2004 diff --git a/NOTICE.txt b/NOTICE.txt index bb1d8f7794..554c42276c 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -10,12 +10,12 @@ Third party libraries used by the Elastic Beats project: -------------------------------------------------------------------------------- -Dependency : github.com/cenkalti/backoff/v4 -Version: v4.3.0 +Dependency : github.com/cenkalti/backoff/v7 +Version: v7.0.0 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/v4@v4.3.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/cenkalti/backoff/v7@v7.0.0/LICENSE: The MIT License (MIT) @@ -40,12 +40,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- -Dependency : github.com/dgraph-io/ristretto -Version: v0.2.0 +Dependency : github.com/dgraph-io/ristretto/v2 +Version: v2.4.2 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/dgraph-io/ristretto@v0.2.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/dgraph-io/ristretto/v2@v2.4.2/LICENSE: Apache License Version 2.0, January 2004 From ccce2da2f85930f9f2e225998d2fd8e282ef1251 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 31 Aug 2026 15:35:29 -0700 Subject: [PATCH 3/3] fix: update ristretto cache to use generic type parameters for v2 API The ristretto/v2 library uses Go generics; `ristretto.Config` and `ristretto.Cache` require explicit type parameters. Update `Cacher` interface keys from `any` to `string` (all keys were already strings) so that `*ristretto.Cache[string, any]` satisfies the interface directly. Co-Authored-By: Claude Sonnet 4.6 --- internal/pkg/cache/impl.go | 6 +++--- internal/pkg/cache/impl_integration.go | 6 +++--- internal/pkg/cache/impl_ristretto.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/pkg/cache/impl.go b/internal/pkg/cache/impl.go index f593518172..02be6adf0c 100644 --- a/internal/pkg/cache/impl.go +++ b/internal/pkg/cache/impl.go @@ -9,8 +9,8 @@ import ( ) type Cacher interface { - Get(key any) (any, bool) - Set(key, value any, cost int64) bool - SetWithTTL(key, value any, cost int64, ttl time.Duration) bool + Get(key string) (any, bool) + Set(key string, value any, cost int64) bool + SetWithTTL(key string, value any, cost int64, ttl time.Duration) bool Close() } diff --git a/internal/pkg/cache/impl_integration.go b/internal/pkg/cache/impl_integration.go index e241175160..2533b121d5 100644 --- a/internal/pkg/cache/impl_integration.go +++ b/internal/pkg/cache/impl_integration.go @@ -18,15 +18,15 @@ func newCache(_ config.Cache) (Cacher, error) { type NoCache struct{} -func (c *NoCache) Get(_ any) (any, bool) { +func (c *NoCache) Get(_ string) (any, bool) { return nil, false } -func (c *NoCache) Set(_ any, _ any, _ int64) bool { +func (c *NoCache) Set(_ string, _ any, _ int64) bool { return true } -func (c *NoCache) SetWithTTL(_, _ any, _ int64, _ time.Duration) bool { +func (c *NoCache) SetWithTTL(_ string, _ any, _ int64, _ time.Duration) bool { return true } diff --git a/internal/pkg/cache/impl_ristretto.go b/internal/pkg/cache/impl_ristretto.go index f0a3ba0f13..62d63e7956 100644 --- a/internal/pkg/cache/impl_ristretto.go +++ b/internal/pkg/cache/impl_ristretto.go @@ -13,7 +13,7 @@ import ( ) func newCache(cfg config.Cache) (Cacher, error) { - rcfg := &ristretto.Config{ + rcfg := &ristretto.Config[string, any]{ NumCounters: cfg.NumCounters, MaxCost: cfg.MaxCost, BufferItems: 64,