Skip to content

Commit 6aa3d1a

Browse files
authored
ci: use more durable version detection in some iast benchmarks (#15259)
## Description These benchmarks used `_version` directly, which isn't present when the version string is hardcoded in pyproject.toml.
1 parent d744a92 commit 6aa3d1a

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

benchmarks/appsec_iast_aspects/functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import os
33
import re
44

5-
import ddtrace._version as version
5+
from ddtrace import get_version
66

77

8+
version = get_version()
9+
810
# Some old versions could not have or export some symbols, so we import them dynamically and assign None if not found
911
# which will make the aspect benchmark fail but not the entire benchmark
1012
symbols = [

benchmarks/appsec_iast_aspects_ospath/functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import os
33
import re
44

5-
import ddtrace._version as version
5+
from ddtrace import get_version
66

77

8+
version = get_version()
9+
810
# Some old versions could not have or export some symbols, so we import them dynamically and assign None if not found
911
# which will make the aspect benchmark fail but not the entire benchmark
1012
symbols = [

benchmarks/appsec_iast_aspects_re_module/functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import os
33
import re
44

5-
import ddtrace._version as version
5+
from ddtrace import get_version
66

77

8+
version = get_version()
9+
810
# Some old versions could not have or export some symbols, so we import them dynamically and assign None if not found
911
# which will make the aspect benchmark fail but not the entire benchmark
1012
symbols = [

benchmarks/appsec_iast_aspects_split/functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import os
33
import re
44

5-
import ddtrace._version as version
5+
from ddtrace import get_version
66

77

8+
version = get_version()
9+
810
# Some old versions could not have or export some symbols, so we import them dynamically and assign None if not found
911
# which will make the aspect benchmark fail but not the entire benchmark
1012
symbols = [

0 commit comments

Comments
 (0)