Skip to content

Commit 773adf1

Browse files
authored
fix(grouping): Fix snapshot tests (#97650)
This fixes a few small issues with our grouping snapshot tests: - Now that the legacy grouping config is gone, we no longer consider line number or symbol in our grouping algorithm, so this removes the tests covering that behavior. - The "uses context line over function" test did indeed do exactly that under the legacy config, but needed more data in order to do so under the newstyle config. - The "no system frames" test... had a system frame? Can't blame that on the legacy config, but figured I might as well fix it while I was updating snapshot tests.
1 parent 3457056 commit 773adf1

15 files changed

+29
-254
lines changed

tests/sentry/grouping/grouping_inputs/frame-skips-symbol-if-unknown.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/sentry/grouping/grouping_inputs/frame-uses-context-line-over-function.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
2+
"platform": "javascript",
23
"stacktrace": {
34
"frames": [
45
{
56
"function": "bar",
67
"abs_path": "foo.py",
78
"lineno": 1,
89
"context_line": "foo bar",
9-
"filename": "foo.py"
10+
"filename": "foo.py",
11+
"data": {
12+
"sourcemap": "http://dogs.are.great/sit/stay.js.map"
13+
}
1014
}
1115
]
1216
}

tests/sentry/grouping/grouping_inputs/frame-uses-function-over-lineno.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/sentry/grouping/grouping_inputs/frame-uses-symbol-instead-of-function.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/sentry/grouping/grouping_inputs/stacktrace-hash-without-system-frames.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
{
1111
"abs_path": "bar.py",
1212
"lineno": 1,
13-
"filename": "bar.py"
13+
"filename": "bar.py",
14+
"in_app": true
1415
}
1516
]
1617
}

tests/sentry/grouping/snapshots/test_grouphash_metadata/test_metadata_from_variants/newstyle@2023_01_11/frame_skips_symbol_if_unknown.pysnap

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/sentry/grouping/snapshots/test_grouphash_metadata/test_metadata_from_variants/newstyle@2023_01_11/frame_uses_context_line_over_function.pysnap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2024-12-17T22:50:35.428086+00:00'
2+
created: '2025-08-11T23:13:29.871161+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouphash_metadata.py
55
---
@@ -24,13 +24,13 @@ metrics with tags: {
2424
---
2525
contributing variants:
2626
system*
27-
hash: "fb73cb54ced59b1c0c60d9bb40b7336b"
27+
hash: "60e0a667027bef0d0b7c4882891df7e8"
2828
contributing component: stacktrace
2929
component:
3030
system*
3131
stacktrace*
3232
frame*
3333
filename*
3434
"foo.py"
35-
function*
36-
"bar"
35+
context-line*
36+
"foo bar"

tests/sentry/grouping/snapshots/test_grouphash_metadata/test_metadata_from_variants/newstyle@2023_01_11/frame_uses_function_over_lineno.pysnap

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/sentry/grouping/snapshots/test_grouphash_metadata/test_metadata_from_variants/newstyle@2023_01_11/frame_uses_symbol_instead_of_function.pysnap

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/sentry/grouping/snapshots/test_grouphash_metadata/test_metadata_from_variants/newstyle@2023_01_11/stacktrace_hash_without_system_frames.pysnap

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2025-04-25T21:24:41.413332+00:00'
2+
created: '2025-08-11T23:13:51.203046+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouphash_metadata.py
55
---
@@ -24,23 +24,14 @@ metrics with tags: {
2424
---
2525
contributing variants:
2626
app*
27-
hash: "1effb24729ae4c43efa36b460511136a"
27+
hash: "659ad79e2e70c822d30a53d7d889529e"
2828
contributing component: stacktrace
2929
component:
3030
app*
3131
stacktrace*
3232
frame* (marked in-app by the client)
3333
filename*
3434
"foo.py"
35-
system*
36-
hash: "659ad79e2e70c822d30a53d7d889529e"
37-
contributing component: stacktrace
38-
component:
39-
system*
40-
stacktrace*
41-
frame*
42-
filename*
43-
"foo.py"
44-
frame*
35+
frame* (marked in-app by the client)
4536
filename*
4637
"bar.py"

0 commit comments

Comments
 (0)