Skip to content

feat(contrib/valkey-io): bump valkey-go and add SetOnInvalidations wrapper#4657

Merged
darccio merged 2 commits into
DataDog:mainfrom
Scorfly:bump-valkey-version
Apr 14, 2026
Merged

feat(contrib/valkey-io): bump valkey-go and add SetOnInvalidations wrapper#4657
darccio merged 2 commits into
DataDog:mainfrom
Scorfly:bump-valkey-version

Conversation

@Scorfly

@Scorfly Scorfly commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Upgrade valkey-go to v1.0.74, which extends DedicatedClient with SetOnInvalidations for client-side caching invalidations. Delegate the new hook on the traced dedicated client so the wrapper still implements the upstream interface.

Motivation

We cannot bump the valkey lib in our project.
They added the SetOnInvalidations on the DedicatedClient interface

It create issue on DataDog lib side because it does not match the interface

~/work/DataDog/dd-trace-go/contrib/valkey-io/valkey-go git:(main) ✗ $ go test ./...
go: downloading github.com/DataDog/datadog-go v3.2.0+incompatible
go: downloading google.golang.org/genproto v0.0.0-20251022142026-3a174f9686a8
# github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 [github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2.test]
./valkey.go:129:13: cannot use &dedicatedClient{…} (value of type *dedicatedClient) as "github.com/valkey-io/valkey-go".DedicatedClient value in argument to fn: *dedicatedClient does not implement "github.com/valkey-io/valkey-go".DedicatedClient (missing method SetOnInvalidations)
./valkey.go:138:9: cannot use &dedicatedClient{…} (value of type *dedicatedClient) as "github.com/valkey-io/valkey-go".DedicatedClient value in return statement: *dedicatedClient does not implement "github.com/valkey-io/valkey-go".DedicatedClient (missing method SetOnInvalidations)
./valkey.go:165:29: cannot use (*dedicatedClient)(nil) (value of type *dedicatedClient) as "github.com/valkey-io/valkey-go".DedicatedClient value in variable declaration: *dedicatedClient does not implement "github.com/valkey-io/valkey-go".DedicatedClient (missing method SetOnInvalidations)
FAIL    github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 [build failed]
FAIL

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running make lint locally.
  • New code doesn't break existing tests. You can check this by running make test locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • All generated files are up to date. You can check this by running make generate locally.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running make fix-modules locally.

@Scorfly
Scorfly requested review from a team as code owners April 13, 2026 19:05
@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.71%. Comparing base (43ac765) to head (b157a04).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

see 440 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darccio

darccio commented Apr 14, 2026

Copy link
Copy Markdown
Member

Hi @Scorfly, thanks for the PR! Please run make fix-modules and make generate to ensure all the go.mod files are up to date.

Scorfly added 2 commits April 14, 2026 10:53
Upgrade valkey-go to v1.0.74, which extends DedicatedClient with
SetOnInvalidations for client-side caching invalidations. Delegate the
new hook on the traced dedicated client so the wrapper still implements
the upstream interface.
@Scorfly
Scorfly force-pushed the bump-valkey-version branch from b0711f3 to b157a04 Compare April 14, 2026 08:55
@darccio darccio changed the title contrib/valkey-io: bump valkey-go and add SetOnInvalidations wrapper feat(contrib/valkey-io): bump valkey-go and add SetOnInvalidations wrapper Apr 14, 2026
@darccio darccio added the apm:ecosystem contrib/* related feature requests or bugs label Apr 14, 2026
@darccio
darccio merged commit 9e5a7e4 into DataDog:main Apr 14, 2026
110 of 114 checks passed
darccio added a commit that referenced this pull request Apr 14, 2026
…ient` (#4659)

### What does this PR do?

Mirrors #4657 on `contrib/redis/rueidis`.

### Motivation

Fix `smoke-tests`.

### Reviewer's Checklist

- [x] Changed code has unit tests for its functionality at or near 100%
coverage.
- [x] New code is free of linting errors. You can check this by running
`make lint` locally.
- [x] New code doesn't break existing tests. You can check this by
running `make test` locally.
- [x] Add an appropriate team label so this PR gets put in the right
place for the release notes.
- [x] All generated files are up to date. You can check this by running
`make generate` locally.
- [x] Non-trivial go.mod changes, e.g. adding new modules, are reviewed
by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to
date by running `make fix-modules` locally.

Unsure? Have a question? Request a review!
darccio added a commit that referenced this pull request Apr 17, 2026
…ient` (#4659)

Mirrors #4657 on `contrib/redis/rueidis`.

Fix `smoke-tests`.

- [x] Changed code has unit tests for its functionality at or near 100%
coverage.
- [x] New code is free of linting errors. You can check this by running
`make lint` locally.
- [x] New code doesn't break existing tests. You can check this by
running `make test` locally.
- [x] Add an appropriate team label so this PR gets put in the right
place for the release notes.
- [x] All generated files are up to date. You can check this by running
`make generate` locally.
- [x] Non-trivial go.mod changes, e.g. adding new modules, are reviewed
by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to
date by running `make fix-modules` locally.

Unsure? Have a question? Request a review!
darccio pushed a commit that referenced this pull request Apr 17, 2026
…apper (#4657)

Upgrade valkey-go to v1.0.74, which extends DedicatedClient with
SetOnInvalidations for client-side caching invalidations. Delegate the
new hook on the traced dedicated client so the wrapper still implements
the upstream interface.

We cannot bump the valkey lib in our project.
They added the `SetOnInvalidations` on the `DedicatedClient` interface
-
valkey-io/valkey-go@26dc6e8

It create issue on DataDog lib side because it does not match the
interface
```console
~/work/DataDog/dd-trace-go/contrib/valkey-io/valkey-go git:(main) ✗ $ go test ./...
go: downloading github.com/DataDog/datadog-go v3.2.0+incompatible
go: downloading google.golang.org/genproto v0.0.0-20251022142026-3a174f9686a8
./valkey.go:129:13: cannot use &dedicatedClient{…} (value of type *dedicatedClient) as "github.com/valkey-io/valkey-go".DedicatedClient value in argument to fn: *dedicatedClient does not implement "github.com/valkey-io/valkey-go".DedicatedClient (missing method SetOnInvalidations)
./valkey.go:138:9: cannot use &dedicatedClient{…} (value of type *dedicatedClient) as "github.com/valkey-io/valkey-go".DedicatedClient value in return statement: *dedicatedClient does not implement "github.com/valkey-io/valkey-go".DedicatedClient (missing method SetOnInvalidations)
./valkey.go:165:29: cannot use (*dedicatedClient)(nil) (value of type *dedicatedClient) as "github.com/valkey-io/valkey-go".DedicatedClient value in variable declaration: *dedicatedClient does not implement "github.com/valkey-io/valkey-go".DedicatedClient (missing method SetOnInvalidations)
FAIL    github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 [build failed]
FAIL
```

- [ ] Changed code has unit tests for its functionality at or near 100%
coverage.
- [ ] [System-Tests](https://github.com/DataDog/system-tests/) covering
this feature have been added and enabled with the va.b.c-dev version
tag.
- [ ] There is a benchmark for any new code, or changes to existing
code.
- [x] If this interacts with the agent in a new way, a system test has
been added.
- [x] New code is free of linting errors. You can check this by running
`make lint` locally.
- [x] New code doesn't break existing tests. You can check this by
running `make test` locally.
- [ ] Add an appropriate team label so this PR gets put in the right
place for the release notes.
- [x] All generated files are up to date. You can check this by running
`make generate` locally.
- [x] Non-trivial go.mod changes, e.g. adding new modules, are reviewed
by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to
date by running `make fix-modules` locally.
@darccio

darccio commented Apr 17, 2026

Copy link
Copy Markdown
Member

Release as v2.7.3: https://github.com/DataDog/dd-trace-go/releases/tag/v2.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants