Skip to content

Commit f1e92d1

Browse files
juanjuxcbeauchesnechristophe-papazianwantsuibrettlangdon
authored
chore: fix the 2.21 branch CI (#14980)
## 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) --------- Signed-off-by: Juanjo Alvarez <[email protected]> Co-authored-by: Charles de Beauchesne <[email protected]> Co-authored-by: Christophe Papazian <[email protected]> Co-authored-by: wantsui <[email protected]> Co-authored-by: Brett Langdon <[email protected]>
1 parent a85f22c commit f1e92d1

File tree

21 files changed

+125
-125
lines changed

21 files changed

+125
-125
lines changed

.github/workflows/build_python_3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
# SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
124124
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
125125
# See: https://stackoverflow.com/a/65402241
126-
CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0
126+
CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 DD_COMPILE_ABSEIL=0 MACOSX_DEPLOYMENT_TARGET=10.14
127127
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
128128
mkdir ./tempwheelhouse &&
129129
unzip -l {wheel} | grep '\.so' &&

.github/workflows/system-tests.yml

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ on:
1111
- cron: '00 04 * * 2-6'
1212

1313
jobs:
14+
build-wheels:
15+
uses: ./.github/workflows/build_python_3.yml
16+
with:
17+
cibw_build: 'cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64'
18+
1419
system-tests-build-weblog:
20+
needs:
21+
- build-wheels
1522
runs-on: ubuntu-latest
1623
strategy:
1724
matrix:
@@ -27,31 +34,24 @@ jobs:
2734
env:
2835
TEST_LIBRARY: python
2936
WEBLOG_VARIANT: ${{ matrix.weblog-variant }}
30-
# system-tests requires an API_KEY, but it does not have to be a valid key, as long as we don't run a scenario
31-
# that make assertion on backend data. Using a fake key allow to run system tests on PR originating from forks.
32-
# If ever it's needed, a valid key exists in the repo, using ${{ secrets.DD_API_KEY }}
33-
DD_API_KEY: ${{ secrets.FAKE_DD_API_KEY }}
3437
CMAKE_BUILD_PARALLEL_LEVEL: 12
35-
SYSTEM_TESTS_AWS_ACCESS_KEY_ID: ${{ secrets.IDM_AWS_ACCESS_KEY_ID }}
36-
SYSTEM_TESTS_AWS_SECRET_ACCESS_KEY: ${{ secrets.IDM_AWS_SECRET_ACCESS_KEY }}
3738
steps:
39+
- name: Install Dependencies
40+
run: sudo apt-get install -y patchelf
3841

3942
- name: Checkout system tests
4043
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4144
with:
4245
persist-credentials: false
4346
repository: 'DataDog/system-tests'
44-
ref: 'bb677c0b7d6dd7309d4162f4540bc3d7c604486e'
47+
ref: 'e79028841e520eae0604198be4ce10bbad067c63'
4548

46-
- name: Checkout dd-trace-py
47-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
- name: Download wheels to binaries directory
50+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
4851
with:
49-
persist-credentials: false
50-
path: 'binaries/dd-trace-py'
51-
fetch-depth: 0
52-
# NB this ref is necessary to keep the checkout out of detached HEAD state, which setuptools_scm requires for
53-
# proper version guessing
54-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
52+
pattern: wheels-*
53+
path: binaries/
54+
merge-multiple: true
5555

5656
- name: Build
5757
run: ./build.sh -i weblog
@@ -80,21 +80,15 @@ jobs:
8080
env:
8181
TEST_LIBRARY: python
8282
WEBLOG_VARIANT: ${{ matrix.weblog-variant }}
83-
# system-tests requires an API_KEY, but it does not have to be a valid key, as long as we don't run a scenario
84-
# that make assertion on backend data. Using a fake key allow to run system tests on PR originating from forks.
85-
# If ever it's needed, a valid key exists in the repo, using ${{ secrets.DD_API_KEY }}
86-
DD_API_KEY: ${{ secrets.FAKE_DD_API_KEY }}
8783
CMAKE_BUILD_PARALLEL_LEVEL: 12
88-
SYSTEM_TESTS_AWS_ACCESS_KEY_ID: ${{ secrets.IDM_AWS_ACCESS_KEY_ID }}
89-
SYSTEM_TESTS_AWS_SECRET_ACCESS_KEY: ${{ secrets.IDM_AWS_SECRET_ACCESS_KEY }}
9084
steps:
9185

9286
- name: Checkout system tests
9387
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9488
with:
9589
persist-credentials: false
9690
repository: 'DataDog/system-tests'
97-
ref: 'bb677c0b7d6dd7309d4162f4540bc3d7c604486e'
91+
ref: 'e79028841e520eae0604198be4ce10bbad067c63'
9892

9993
- name: Build runner
10094
uses: ./.github/actions/install_runner
@@ -209,10 +203,6 @@ jobs:
209203
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
210204
run: ./run.sh APPSEC_BLOCKING_FULL_DENYLIST
211205

212-
- name: Run APPSEC_REQUEST_BLOCKING
213-
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
214-
run: ./run.sh APPSEC_REQUEST_BLOCKING
215-
216206
- name: Run APPSEC_RASP
217207
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
218208
run: ./run.sh APPSEC_RASP
@@ -252,24 +242,27 @@ jobs:
252242

253243

254244
parametric:
255-
runs-on:
256-
group: "APM Larger Runners"
245+
needs:
246+
- build-wheels
247+
runs-on: ubuntu-latest
257248
env:
258249
TEST_LIBRARY: python
259250
steps:
251+
- name: Install Dependencies
252+
run: sudo apt-get install -y patchelf
253+
260254
- name: Checkout system tests
261255
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
262256
with:
263257
persist-credentials: false
264258
repository: 'DataDog/system-tests'
265-
ref: 'bb677c0b7d6dd7309d4162f4540bc3d7c604486e'
266-
- name: Checkout dd-trace-py
267-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
259+
ref: 'e79028841e520eae0604198be4ce10bbad067c63'
260+
- name: Download wheels to binaries directory
261+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
268262
with:
269-
persist-credentials: false
270-
path: 'binaries/dd-trace-py'
271-
fetch-depth: 0
272-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
263+
pattern: wheels-*
264+
path: binaries/
265+
merge-multiple: true
273266

274267
- name: Build runner
275268
id: build_runner

.gitlab/download-wheels-from-gh-actions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ echo "Found RUN_ID: $RUN_ID"
3737
mkdir pywheels
3838
cd pywheels
3939

40-
if [[ $(gh run view $RUN_ID --exit-status --json status --jq .status) != "completed" ]]; then
40+
if [[ $(gh run view $RUN_ID --repo DataDog/dd-trace-py --exit-status --json status --jq .status) != "completed" ]]; then
4141
echo "Waiting for workflow to finish"
4242

4343
# Give time to the job to finish

ddtrace/appsec/_iast/_taint_tracking/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
4545
add_definitions(-DDONT_COMPILE_ABSEIL) # Define DONT_COMPILE_ABSEIL preprocessor variable
4646
else()
4747
message("Release mode: using abseil (DD_COMPILE_ABSEIL unset or not 0/false)")
48-
FetchContent_Declare(absl URL "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.zip")
48+
FetchContent_Declare(absl URL "https://github.com/abseil/abseil-cpp/archive/refs/tags/20250127.1.zip")
4949
FetchContent_MakeAvailable(absl)
5050
endif()
5151

ddtrace/debugging/_encoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def put(self, item: Snapshot) -> int:
319319

320320
def put_encoded(self, item: Snapshot, encoded: bytes) -> int:
321321
try:
322-
with self._lock:
322+
with self._lock: # type: ignore
323323
size = self._buffer.put(encoded)
324324
self.count += 1
325325
return size
@@ -329,7 +329,7 @@ def put_encoded(self, item: Snapshot, encoded: bytes) -> int:
329329
raise
330330

331331
def flush(self) -> Optional[Union[bytes, bytearray]]:
332-
with self._lock:
332+
with self._lock: # type: ignore
333333
if self.count == 0:
334334
# Reclaim memory
335335
self._buffer._reset()

ddtrace/debugging/_probe/registry.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, status_logger: ProbeStatusLogger, *args: Any, **kwargs: Any)
7272

7373
def register(self, *probes: Probe) -> None:
7474
"""Register a probe."""
75-
with self._lock:
75+
with self._lock: # type: ignore
7676
for probe in probes:
7777
if probe in self:
7878
# Already registered.
@@ -105,7 +105,7 @@ def update(self, probe):
105105

106106
def set_installed(self, probe: Probe) -> None:
107107
"""Set the installed flag for a probe."""
108-
with self._lock:
108+
with self._lock: # type: ignore
109109
self[probe.probe_id].set_installed()
110110

111111
# No longer pending
@@ -115,15 +115,15 @@ def set_installed(self, probe: Probe) -> None:
115115

116116
def set_emitting(self, probe: Probe) -> None:
117117
"""Set the emitting flag for a probe."""
118-
with self._lock:
118+
with self._lock: # type: ignore
119119
entry = cast(ProbeRegistryEntry, self[probe.probe_id])
120120
if not entry.emitting:
121121
entry.set_emitting()
122122
self.logger.emitting(probe)
123123

124124
def set_error(self, probe: Probe, error_type: str, message: str) -> None:
125125
"""Set the error message for a probe."""
126-
with self._lock:
126+
with self._lock: # type: ignore
127127
self[probe.probe_id].set_error(error_type, message)
128128
self.logger.error(probe, (error_type, message))
129129

@@ -140,12 +140,12 @@ def _log_probe_status_unlocked(self, entry: ProbeRegistryEntry) -> None:
140140

141141
def log_probe_status(self, probe: Probe) -> None:
142142
"""Log the status of a probe using the status logger."""
143-
with self._lock:
143+
with self._lock: # type: ignore
144144
self._log_probe_status_unlocked(self[probe.probe_id])
145145

146146
def log_probes_status(self) -> None:
147147
"""Log the status of all the probes using the status logger."""
148-
with self._lock:
148+
with self._lock: # type: ignore
149149
for entry in self.values():
150150
self._log_probe_status_unlocked(entry)
151151

@@ -180,7 +180,7 @@ def unregister(self, *probes: Probe) -> List[Probe]:
180180
been processed yet.
181181
"""
182182
unregistered_probes = []
183-
with self._lock:
183+
with self._lock: # type: ignore
184184
for probe in probes:
185185
try:
186186
entry = self.pop(probe.probe_id)
@@ -201,5 +201,5 @@ def __contains__(self, probe: object) -> bool:
201201
"""Check if a probe is in the registry."""
202202
assert isinstance(probe, Probe), probe # nosec
203203

204-
with self._lock:
204+
with self._lock: # type: ignore
205205
return super().__contains__(probe.probe_id)

ddtrace/internal/datastreams/processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def on_checkpoint_creation(
177177

178178
now_ns = int(now_sec * 1e9)
179179

180-
with self._lock:
180+
with self._lock: # type: ignore
181181
# Align the span into the corresponding stats bucket
182182
bucket_time_ns = now_ns - (now_ns % self._bucket_size_ns)
183183
aggr_key = (",".join(edge_tags), hash_value, parent_hash)
@@ -290,7 +290,7 @@ def _flush_stats(self, payload):
290290
def periodic(self):
291291
# type: () -> None
292292

293-
with self._lock:
293+
with self._lock: # type: ignore
294294
serialized_stats = self._serialize_buckets()
295295

296296
if not serialized_stats:

ddtrace/internal/processor/endpoint_call_counter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class EndpointCallCounterProcessor(SpanProcessor):
2222
default_factory=dict, init=False, repr=False, compare=False
2323
)
2424
_endpoint_counts_lock: typing.ContextManager = field(
25-
default_factory=forksafe.Lock, init=False, repr=False, compare=False
25+
default_factory=forksafe.Lock, init=False, repr=False, compare=False # type: ignore
2626
)
2727
_enabled: bool = field(default=False, repr=False, compare=False)
2828

ddtrace/internal/processor/stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def on_span_finish(self, span):
133133
if not is_top_level and not _is_measured(span):
134134
return
135135

136-
with self._lock:
136+
with self._lock: # type: ignore
137137
# Align the span into the corresponding stats bucket
138138
assert span.duration_ns is not None
139139
span_end_ns = span.start_ns + span.duration_ns
@@ -226,7 +226,7 @@ def _flush_stats(self, payload):
226226
def periodic(self):
227227
# type: (...) -> None
228228

229-
with self._lock:
229+
with self._lock: # type: ignore
230230
serialized_stats = self._serialize_buckets()
231231

232232
if not serialized_stats:

ddtrace/internal/runtime/runtime_metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(self, interval=_get_interval_or_default(), tracer=ddtrace.tracer, d
8585
@classmethod
8686
def disable(cls):
8787
# type: () -> None
88-
with cls._lock:
88+
with cls._lock: # type: ignore
8989
if cls._instance is None:
9090
return
9191

@@ -115,7 +115,7 @@ def _restart(cls):
115115
@classmethod
116116
def enable(cls, flush_interval=None, tracer=None, dogstatsd_url=None):
117117
# type: (Optional[float], Optional[ddtrace.trace.Tracer], Optional[str]) -> None
118-
with cls._lock:
118+
with cls._lock: # type: ignore
119119
if cls._instance is not None:
120120
return
121121
if flush_interval is None:

0 commit comments

Comments
 (0)