Skip to content

Commit 00c254b

Browse files
authored
chore(ci_visibility): remove code (#12798)
CI Visibility: Remove code no longer used ## Checklist - [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)) ## Reviewer Checklist - [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)
1 parent 9f878b5 commit 00c254b

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

ddtrace/internal/ci_visibility/recorder.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from ddtrace.internal import atexit
3333
from ddtrace.internal import core
3434
from ddtrace.internal import telemetry
35-
from ddtrace.internal.agent import get_connection
3635
from ddtrace.internal.ci_visibility._api_client import AgentlessTestVisibilityAPIClient
3736
from ddtrace.internal.ci_visibility._api_client import EarlyFlakeDetectionSettings
3837
from ddtrace.internal.ci_visibility._api_client import EVPProxyTestVisibilityAPIClient
@@ -84,8 +83,6 @@
8483
from ddtrace.internal.test_visibility.api import InternalTest
8584
from ddtrace.internal.test_visibility.coverage_lines import CoverageLines
8685
from ddtrace.internal.utils.formats import asbool
87-
from ddtrace.internal.utils.http import verify_url
88-
from ddtrace.internal.writer.writer import Response
8986
from ddtrace.settings import IntegrationConfig
9087
from ddtrace.trace import Span
9188
from ddtrace.trace import Tracer
@@ -144,23 +141,6 @@ def _get_custom_configurations() -> Dict[str, str]:
144141
return custom_configurations
145142

146143

147-
def _do_request(
148-
method: str, url: str, payload: str, headers: Dict[str, str], timeout: int = DEFAULT_TIMEOUT
149-
) -> Response:
150-
try:
151-
parsed_url = verify_url(url)
152-
url_path = parsed_url.path
153-
conn = get_connection(url, timeout=timeout)
154-
log.debug("Sending request: %s %s %s %s", method, url_path, payload, headers)
155-
conn.request("POST", url_path, payload, headers)
156-
resp = conn.getresponse()
157-
log.debug("Response status: %s", resp.status)
158-
result = Response.from_http_response(resp)
159-
finally:
160-
conn.close()
161-
return result
162-
163-
164144
class CIVisibilityTracer(Tracer):
165145
def __init__(self, *args, **kwargs) -> None:
166146
# Allows for multiple instances of the civis tracer to be created without logging a warning

tests/ci_visibility/util.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ def _mock_upload_git_metadata(obj, **kwargs):
137137
_upload_packfiles=classmethod(lambda *args, **kwargs: None),
138138
upload_git_metadata=_mock_upload_git_metadata,
139139
_do_request=NotImplementedError,
140-
), mock.patch(
141-
"ddtrace.internal.ci_visibility.recorder._do_request", side_effect=NotImplementedError
142140
):
143141
yield
144142

0 commit comments

Comments
 (0)