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): move httplib,httpx,jinja2,kafka,kombu to internal #10166

Merged
merged 6 commits into from
Aug 13, 2024

Conversation

rachelyangdog
Copy link
Contributor

@rachelyangdog rachelyangdog commented Aug 9, 2024

  • Moves all integration internals in ddtrace/contrib/(integration name)/ to ddtrace/contrib/internal/(integration name)/ for httplib, httpx, jinja2, kafka, and kombu
  • Ensures ddtrace/contrib/(integration name)/ and ddtrace/contrib/(integration name)/ continue to expose the same functions, classes, imports, and module level variables (via from ..internal.integration.module import * imports).
  • Log a deprecation warning if internal modules in ddtrace/contrib/(integration name)/ and ddtrace/contrib/(integration name)/. Only patch and unpack methods should be exposed by these packages.
  • chore(integrations): moves integration internals to ddtrace.contrib.internal.integration_name #9996

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

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

@rachelyangdog rachelyangdog added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 9, 2024
@rachelyangdog rachelyangdog requested review from a team as code owners August 9, 2024 17:42
Copy link
Contributor

github-actions bot commented Aug 9, 2024

CODEOWNERS have been resolved as:

ddtrace/contrib/internal/httplib/patch.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/httpx/patch.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/jinja2/constants.py                            @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/jinja2/patch.py                                @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/kafka/patch.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/kombu/constants.py                             @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/kombu/patch.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/kombu/utils.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
releasenotes/notes/move-integrations-to-internal-httplib-475d071a277b18cf.yaml  @DataDog/apm-python
ddtrace/contrib/httplib/__init__.py                                     @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/httplib/patch.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/httpx/__init__.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/httpx/patch.py                                          @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/jinja2/__init__.py                                      @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/jinja2/constants.py                                     @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/jinja2/patch.py                                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/kafka/__init__.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/kafka/patch.py                                          @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/kombu/__init__.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/kombu/constants.py                                      @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/kombu/patch.py                                          @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/kombu/utils.py                                          @DataDog/apm-core-python @DataDog/apm-idm-python
tests/.suitespec.json                                                   @DataDog/python-guild @DataDog/apm-core-python

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Aug 9, 2024

Datadog Report

Branch report: rachel.yang/internalize-contrib-httplib
Commit report: 7d223aa
Test service: dd-trace-py

✅ 0 Failed, 140439 Passed, 38330 Skipped, 7h 26m 56.97s Total duration (3h 5m 26.07s time saved)
⌛ 2 Performance Regressions

⌛ Performance Regressions vs Default Branch (2)

  • test_patch_import_unpatch - test_tornado_patch.py 11.13s (+10.56s, +1840%) - Details
  • test_import_patch_patch - test_tornado_patch.py 13.88s (+13.3s, +2298%) - Details

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 48.30508% with 122 lines in your changes missing coverage. Please review.

Project coverage is 9.53%. Comparing base (7c42a03) to head (a0f3d31).
Report is 12 commits behind head on main.

Files Patch % Lines
ddtrace/contrib/internal/jinja2/patch.py 37.50% 45 Missing ⚠️
ddtrace/contrib/internal/httpx/patch.py 68.46% 35 Missing ⚠️
ddtrace/contrib/httplib/__init__.py 0.00% 8 Missing ⚠️
ddtrace/contrib/jinja2/constants.py 0.00% 8 Missing ⚠️
ddtrace/contrib/kombu/constants.py 0.00% 8 Missing ⚠️
ddtrace/contrib/kombu/utils.py 0.00% 8 Missing ⚠️
ddtrace/contrib/kafka/__init__.py 0.00% 4 Missing ⚠️
ddtrace/contrib/kombu/__init__.py 0.00% 3 Missing ⚠️
ddtrace/contrib/httplib/patch.py 0.00% 1 Missing ⚠️
ddtrace/contrib/kafka/patch.py 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10166       +/-   ##
===========================================
- Coverage   47.31%    9.53%   -37.79%     
===========================================
  Files        1425     1392       -33     
  Lines      129618   125209     -4409     
===========================================
- Hits        61324    11933    -49391     
- Misses      68294   113276    +44982     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Aug 9, 2024

Benchmarks

Benchmark execution time: 2024-08-13 18:10:55

Comparing candidate commit b82296e in PR branch rachel.yang/internalize-contrib-httplib with baseline commit fba36a1 in branch main.

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

@rachelyangdog rachelyangdog requested a review from a team as a code owner August 13, 2024 14:58
@rachelyangdog rachelyangdog enabled auto-merge (squash) August 13, 2024 14:59
@rachelyangdog rachelyangdog enabled auto-merge (squash) August 13, 2024 18:29
@rachelyangdog rachelyangdog merged commit d22c6c1 into main Aug 13, 2024
189 of 193 checks passed
@rachelyangdog rachelyangdog deleted the rachel.yang/internalize-contrib-httplib branch August 13, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants