contrib/redis/rueidis: add Mode method support (v1.0.56)#3360
Closed
korECM wants to merge 2 commits intoDataDog:mainfrom
Closed
contrib/redis/rueidis: add Mode method support (v1.0.56)#3360korECM wants to merge 2 commits intoDataDog:mainfrom
korECM wants to merge 2 commits intoDataDog:mainfrom
Conversation
Add a Mode method on the client struct so that it implements the updated rueidis.Client interface. This fixes a compile error that occurred when using the latest version of rueidis. See DataDog#3347. Also update go.mod and go.sum to bump github.com/redis/rueidis to v1.0.56, along with related dependency upgrades.
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR updates the
dd-trace-gointegration forrueidis(incontrib/redis/rueidis) to support theMode()method recently added to therueidis.Clientinterface. This resolves a compile-time error that occurred when usingdd-trace-gowithrueidisversions v1.0.56 and later.Specifically, it:
Mode() rueidis.ClientModemethod to thetracedClientwrapper.github.com/redis/rueidisdependency ingo.modto versionv1.0.56to ensure the necessary interface method exists and to align with the fix.Motivation
As reported in discussion #3347 , newer versions of the
rueidislibrary (starting from v1.0.56, due to changes in rueidis) introduced aMode()method to theirClientinterface. This caused ourtracedClientwrapper, which embeds therueidis.Client, to no longer satisfy the interface, resulting in compile-time failures for users attempting to usedd-trace-gowith these updatedrueidisversions.This PR directly addresses the incompatibility by implementing the missing
Mode()method on our wrapper, simply calling the underlying client's method.Regarding the Dependency Update:
Implementing this fix required updating the
rueidisdependency tov1.0.56. We acknowledge that bumping dependency versions can potentially impact users who rely on older versions or have specific dependency constraints in their projects.However, the alternative was leaving the integration broken for all users wanting to use
rueidisv1.0.56 or newer. Given that this prevents users from adopting recent library updates alongsidedd-trace-go, we decided that updating the dependency and fixing the compilation issue was the necessary path forward to restore functionality for those users. We believe this addresses a more immediate and blocking problem. We encourage reviewers to consider this trade-off.Related Discussion: #3347
Reviewer's Checklist
v2-devbranch and reviewed by @DataDog/apm-go.