Skip to content

Commit 2b5dc77

Browse files
authored
chore(python): use Python 3.12 for all scenarios (#131)
* chore(python): use Python 3.12 for profiler scenarios * fix(python): update Python 3.12 stack expectations * chore(python): align scenario names with Python 3.12 * fix(python): recalibrate safe-point bias for Python 3.12
1 parent 5586100 commit 2b5dc77

106 files changed

Lines changed: 101 additions & 202 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/list-scenarios/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type matrixEntry struct {
4141

4242
func run(pattern, scenariosDir string, chunkSize int) ([]matrixEntry, error) {
4343
// Anchor the user pattern so e.g. "python" doesn't accidentally match
44-
// "python_basic_idle_3.10". The non-capturing group preserves precedence of
44+
// "python_basic_idle_3.12". The non-capturing group preserves precedence of
4545
// any alternation inside the user pattern.
4646
re, err := regexp.Compile(`^(?:` + pattern + `)$`)
4747
if err != nil {

cmd/list-scenarios/main_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ func mkScenarios(t *testing.T, names []string) string {
2929
func TestRun_ChunksAlphabetically(t *testing.T) {
3030
root := mkScenarios(t, []string{
3131
// Intentionally unsorted to verify run() sorts before chunking.
32-
"python_basic_idle_3.11",
33-
"python_asyncio_3.11",
34-
"python_basic_idle_3.10",
32+
"python_basic_idle_3.12",
33+
"python_asyncio_3.12",
34+
"python_basic_memory_3.12",
3535
"python_cpu",
36-
"python_deep_stack_3.11",
36+
"python_deep_stack_3.12",
3737
"node_heap", // must be filtered out by the pattern
3838
})
3939

@@ -45,13 +45,13 @@ func TestRun_ChunksAlphabetically(t *testing.T) {
4545
want := []matrixEntry{
4646
{
4747
Shard: "1/2",
48-
Regex: "(^|/)(python_asyncio_3.11|python_basic_idle_3.10|python_basic_idle_3.11)$",
49-
Names: "python_asyncio_3.11, python_basic_idle_3.10, python_basic_idle_3.11",
48+
Regex: "(^|/)(python_asyncio_3.12|python_basic_idle_3.12|python_basic_memory_3.12)$",
49+
Names: "python_asyncio_3.12, python_basic_idle_3.12, python_basic_memory_3.12",
5050
},
5151
{
5252
Shard: "2/2",
53-
Regex: "(^|/)(python_cpu|python_deep_stack_3.11)$",
54-
Names: "python_cpu, python_deep_stack_3.11",
53+
Regex: "(^|/)(python_cpu|python_deep_stack_3.12)$",
54+
Names: "python_cpu, python_deep_stack_3.12",
5555
},
5656
}
5757
if !reflect.DeepEqual(got, want) {
@@ -138,7 +138,7 @@ func TestRun_RegexMatchesIntendedDirAndOnlyThat(t *testing.T) {
138138
root := mkScenarios(t, []string{
139139
"python_cpu",
140140
"python_cpu_sleep_sync_3.12",
141-
"python_basic_idle_3.11",
141+
"python_basic_idle_3.12",
142142
})
143143
got, err := run("python.*", root, 3)
144144
if err != nil {
@@ -155,7 +155,7 @@ func TestRun_RegexMatchesIntendedDirAndOnlyThat(t *testing.T) {
155155
}{
156156
{"scenarios/python_cpu", true},
157157
{"scenarios/python_cpu_sleep_sync_3.12", true},
158-
{"scenarios/python_basic_idle_3.11", true},
158+
{"scenarios/python_basic_idle_3.12", true},
159159
// substring within another name must NOT match
160160
{"scenarios/python_cpu_something_else", false},
161161
// completely unrelated

flakiness_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
//
1717
// Usage:
1818
//
19-
// TEST_SCENARIOS="python_basic_idle_3.11" FLAKINESS_RUNS=10 go test -v -timeout 30m -run TestFlakiness
19+
// TEST_SCENARIOS="python_basic_idle_3.12" FLAKINESS_RUNS=10 go test -v -timeout 30m -run TestFlakiness
2020
//
2121
// Environment variables:
2222
// - TEST_SCENARIOS: regex matching the scenario to test (required, should match exactly one)

scenarios/python_async_on_and_off_cpu_3.11/Dockerfile renamed to scenarios/python_async_on_and_off_cpu_3.12/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
ARG BASE_IMAGE="prof-python-3.11"
1+
ARG BASE_IMAGE="prof-python-3.12"
22
FROM $BASE_IMAGE
33

4-
COPY ./scenarios/python_async_on_and_off_cpu_3.11/main.py \
5-
./scenarios/python_async_on_and_off_cpu_3.11/requirements.txt \
4+
COPY ./scenarios/python_async_on_and_off_cpu_3.12/main.py \
5+
./scenarios/python_async_on_and_off_cpu_3.12/requirements.txt \
66
/app/
77
RUN chmod 644 /app/*
88

scenarios/python_async_on_and_off_cpu_3.11/README.md renamed to scenarios/python_async_on_and_off_cpu_3.12/README.md

Lines changed: 1 addition & 1 deletion

scenarios/python_async_on_and_off_cpu_3.11/expected_profile.json renamed to scenarios/python_async_on_and_off_cpu_3.12/expected_profile.json

File renamed without changes.
File renamed without changes.

scenarios/python_async_on_and_off_cpu_3.11/requirements.txt renamed to scenarios/python_async_on_and_off_cpu_3.12/requirements.txt

File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
ARG BASE_IMAGE="prof-python-3.11"
1+
ARG BASE_IMAGE="prof-python-3.12"
22
FROM $BASE_IMAGE
33

44
RUN pip install ddtrace
55

66
# Copy the Python target into the container
7-
COPY ./scenarios/python_asyncio_3.11/main.py /app/
7+
COPY ./scenarios/python_asyncio_3.12/main.py /app/
88
RUN chmod 644 /app/*
99

1010
# Set the working directory to the location of the program
File renamed without changes.

0 commit comments

Comments
 (0)