Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

badger "cannot use generic type ristretto.Cache[K z.Key, V any] without instantiation" #14297

Closed
carsonip opened this issue Oct 8, 2024 · 2 comments · Fixed by #14469
Closed
Assignees
Labels

Comments

@carsonip
Copy link
Member

carsonip commented Oct 8, 2024

update-beats #14296 is pulling in latest beats (with badgerv4 dep after elastic/beats#40939 ) which pulls in github.com/dgraph-io/ristretto v0.1.2-0.20240116140435-c67e07994f91 which contains a breaking change and compile error. See issue in ristretto dgraph-io/ristretto#394 and dgraph-io/ristretto#386

 Error: #25 16.09 /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/table/table.go:79:14: cannot use generic type ristretto.Cache[K z.Key, V any] without instantiation
Error: #25 16.09 /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/table/table.go:80:14: cannot use generic type ristretto.Cache[K z.Key, V any] without instantiation

ristretto has cut a v0.2.0 release before the breaking change, and v1 after. But this does not fix our use case.

Potential solutions

  1. APM server has to bump to badgerv4 (e.g. v4.3.1 so use ristretto v1). Work to update badger is tracked in Update badger to latest version #11546.
  2. Revert beats badgerv4 bump feat: bump badger to v4 beats#40939
  3. I don't think there's a way to use both badgerv4 (via beats) and badgerv2 in apm-server at the same time as v1 ristretto will be picked over v0 as they share the same import path, and badgerv2 code will get a compile error. Unless we convince ristretto to release a v2 and make badgerv4 use it. See discussion.
  4. Revert beats bump in apm-server

APM Server version (apm-server version): in PR branches e.g. #14296

Provide logs (if relevant):

https://github.com/elastic/apm-server/actions/runs/11232054143/job/31222853639

@carsonip carsonip added the bug label Oct 8, 2024
carsonip added a commit that referenced this issue Oct 9, 2024
Unblock 8.x backport of #14292 to fix #14280. Reverting beats instead of
bumping beats to avoid #14297.
carsonip added a commit to carsonip/apm-server that referenced this issue Oct 9, 2024
Unblock elastic#14292 to fix elastic#14280. Reverting beats instead of
bumping beats to avoid elastic#14297.
carsonip added a commit that referenced this issue Oct 9, 2024
This reverts commit 7f85cd6.

Unblock #14292 to fix #14280. Reverting beats instead of
bumping beats to avoid #14297.
carsonip added a commit that referenced this issue Oct 9, 2024
This reverts commit e258527.

Unblock #14292 to fix #14280. Reverting beats instead of
bumping beats to avoid #14297.
@kruskall
Copy link
Member

This will be fixed once #11546 is fixed.

I'll keep this open since this is about bumping beats but will post updates in the other issue

@kruskall
Copy link
Member

Can be closed by pinning to an older ristretto version #14469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants