Skip to content

Commit

Permalink
chore: deprecate yaaredis integration (#10281)
Browse files Browse the repository at this point in the history
Add deprecation warning to yaaredis, as the yaaredis library [was
deprecated.
](https://github.com/talkiq/yaaredis?tab=readme-ov-file#this-library-is-deprecated)

## Checklist
- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
  • Loading branch information
quinna-h authored Aug 23, 2024
1 parent 25e55d2 commit 025c020
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ddtrace/contrib/internal/yaaredis/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
from ddtrace._trace.utils_redis import _instrument_redis_execute_pipeline
from ddtrace.contrib.redis_utils import _run_redis_command_async
from ddtrace.internal.schema import schematize_service_name
from ddtrace.internal.utils.deprecations import DDTraceDeprecationWarning
from ddtrace.internal.utils.formats import CMD_MAX_LEN
from ddtrace.internal.utils.formats import asbool
from ddtrace.internal.utils.formats import stringify_cache_args
from ddtrace.internal.utils.wrappers import unwrap
from ddtrace.pin import Pin
from ddtrace.vendor.debtcollector import deprecate


config._add(
Expand All @@ -32,6 +34,13 @@ def get_version():

def patch():
"""Patch the instrumented methods"""
deprecate(
prefix="The yaaredis module is deprecated.",
message="The yaaredis module is deprecated and will be deleted.",
category=DDTraceDeprecationWarning,
removal_version="3.0.0",
)

if getattr(yaaredis, "_datadog_patch", False):
return
yaaredis._datadog_patch = True
Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/deprecate-yaaredis-fe7ec032b017778d.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
deprecations:
- |
yaaredis: The yaaredis integration is deprecated and will be removed in a future version.
As an alternative to the yaaredis integration, the redis integration should be used.

0 comments on commit 025c020

Please sign in to comment.