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

chore(integrations): avoids using deprecated apis in ddtrace.patch(…) [backports 2.20] #12153

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Jan 30, 2025

Backports: #12107

Checklist 1

  • 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
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Checklist 2

  • 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 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

…....)`` [3.0] (#12107)

Ensures every integration defines their `patch`, `unpatch`, and/or
`get_versions()` function in
`ddtrace/contrib/internal/integration_name/patch.py`. This allows the
`ddtrace.patch(...)` to load integrations from one well defined
location.

- [x] 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))

- [x] 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)

---------

Co-authored-by: Vítor De Araújo <[email protected]>
(cherry picked from commit 89fa5e5)
@mabdinur mabdinur requested review from a team as code owners January 30, 2025 01:44
@mabdinur mabdinur enabled auto-merge (squash) January 30, 2025 01:44
Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/ensure-all-integrations-have-patch-module-ef2ced613d1f777a.yaml  @DataDog/apm-python
ddtrace/_monkey.py                                                      @DataDog/apm-core-python
ddtrace/appsec/_iast/_patch_modules.py                                  @DataDog/asm-python
ddtrace/contrib/cherrypy/__init__.py                                    @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/flask_cache/__init__.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/aioredis/patch.py                              @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/cassandra/patch.py                             @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/fastapi/patch.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/pytest/_plugin_v2.py                           @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/redis/patch.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/llmobs/_llmobs.py                                               @DataDog/ml-observability
docs/contributing-integrations.rst                                      @DataDog/python-guild
tests/contrib/asyncio/test_tracer.py                                    @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/cherrypy/test_middleware.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/flask_cache/test.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/flask_cache/test_utils.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/flask_cache/test_wrapper_safety.py                        @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/langgraph/test_langgraph_patch.py                         @DataDog/ml-observability
tests/tracer/test_monkey.py                                             @DataDog/apm-sdk-api-python
ddtrace/contrib/internal/cherrypy/patch.py                              @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/flask_cache/patch.py                           @DataDog/apm-core-python @DataDog/apm-idm-python

@mabdinur mabdinur changed the title chore(integrations): avoids using deprecated apis in ddtrace.patch(…) [backports #12107 to 2.20] chore(integrations): avoids using deprecated apis in ddtrace.patch(…) [backports 2.20] Jan 30, 2025
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Jan 30, 2025

Datadog Report

Branch report: backport-12107-to-2.20
Commit report: 0bb917e
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1468 Skipped, 4m 49.18s Total duration (35m 39.84s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Jan 30, 2025

Benchmarks

Benchmark execution time: 2025-01-30 18:20:47

Comparing candidate commit 0bb917e in PR branch backport-12107-to-2.20 with baseline commit d40de8a in branch 2.20.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 380 metrics, 2 unstable metrics.

@erikayasuda erikayasuda disabled auto-merge January 31, 2025 14:28
@erikayasuda erikayasuda merged commit 22f7d47 into 2.20 Jan 31, 2025
667 of 670 checks passed
@erikayasuda erikayasuda deleted the backport-12107-to-2.20 branch January 31, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants