Skip to content

Commit dba5bc9

Browse files
authored
ref(grouping): Small changes to grouping tests (#93960)
This includes two small changes pulled out of an upcoming PR to make it easier to review: - Add some grouping inputs to illustrate the upcoming fix. Also rename a related input to better distinguish it from the new ones. - Add an assertion (currently failing for the new inputs) to show that we're not relying on chained exception error handling when filtering exception groups.
1 parent 272a633 commit dba5bc9

File tree

36 files changed

+912
-11
lines changed

36 files changed

+912
-11
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"exception": {
3+
"values": [
4+
{
5+
"type": "InnerException",
6+
"value": "Nope",
7+
"mechanism": {
8+
"type": "chained",
9+
"handled": false,
10+
"exception_id": 0,
11+
"parent_id": 0
12+
}
13+
},
14+
{
15+
"type": "System.AggregateException",
16+
"value": "One or more errors occurred.",
17+
"mechanism": {
18+
"type": "AppDomain.UnhandledException",
19+
"handled": false,
20+
"is_exception_group": true,
21+
"exception_id": 0
22+
}
23+
}
24+
]
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"exception": {
3+
"values": [
4+
{
5+
"type": "InnerException",
6+
"value": "Nope",
7+
"mechanism": {
8+
"type": "chained",
9+
"handled": false,
10+
"exception_id": 1,
11+
"parent_id": 1
12+
}
13+
},
14+
{
15+
"type": "System.AggregateException",
16+
"value": "One or more errors occurred.",
17+
"mechanism": {
18+
"type": "AppDomain.UnhandledException",
19+
"handled": false,
20+
"is_exception_group": true,
21+
"exception_id": 0
22+
}
23+
}
24+
]
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"exception": {
3+
"values": [
4+
{
5+
"type": "InnermostException",
6+
"value": "Whoops",
7+
"mechanism": {
8+
"type": "chained",
9+
"handled": false,
10+
"exception_id": 3,
11+
"parent_id": 2
12+
}
13+
},
14+
{
15+
"type": "InnerException",
16+
"value": "Nope",
17+
"mechanism": {
18+
"type": "chained",
19+
"handled": false,
20+
"exception_id": 2,
21+
"parent_id": 1
22+
}
23+
}
24+
]
25+
}
26+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"exception": {
3+
"values": [
4+
{
5+
"type": "InnerException",
6+
"value": "Nope",
7+
"mechanism": {
8+
"type": "chained",
9+
"handled": false,
10+
"exception_id": 1,
11+
"parent_id": 0
12+
}
13+
},
14+
{
15+
"type": "System.AggregateException",
16+
"value": "One or more errors occurred.",
17+
"mechanism": {
18+
"type": "AppDomain.UnhandledException",
19+
"handled": false,
20+
"is_exception_group": true,
21+
"exception_id": 0,
22+
"parent_id": 0
23+
}
24+
}
25+
]
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
created: '2025-06-18T22:48:15.930859+00:00'
3+
creator: sentry
4+
source: tests/sentry/grouping/test_grouphash_metadata.py
5+
---
6+
hash_basis: message
7+
hashing_metadata: {
8+
"message_parameterized": false,
9+
"message_source": "exception"
10+
}
11+
---
12+
metrics with tags: {
13+
"grouping.grouphashmetadata.event_hash_basis": {
14+
"hash_basis": "message",
15+
"is_hybrid_fingerprint": "False"
16+
},
17+
"grouping.grouphashmetadata.event_hashing_metadata.message": {
18+
"message_parameterized": "False",
19+
"message_source": "exception"
20+
}
21+
}
22+
---
23+
contributing variants:
24+
system*
25+
hash: "93b26686d00504b4e5aa1cb0244d8b37"
26+
contributing component: chained-exception
27+
component:
28+
system*
29+
chained-exception*
30+
exception*
31+
type*
32+
"InnerException"
33+
value*
34+
"Nope"
35+
exception*
36+
type*
37+
"System.AggregateException"
38+
value*
39+
"One or more errors occurred."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
created: '2025-06-18T22:48:15.815906+00:00'
3+
creator: sentry
4+
source: tests/sentry/grouping/test_grouphash_metadata.py
5+
---
6+
hash_basis: message
7+
hashing_metadata: {
8+
"message_parameterized": false,
9+
"message_source": "exception"
10+
}
11+
---
12+
metrics with tags: {
13+
"grouping.grouphashmetadata.event_hash_basis": {
14+
"hash_basis": "message",
15+
"is_hybrid_fingerprint": "False"
16+
},
17+
"grouping.grouphashmetadata.event_hashing_metadata.message": {
18+
"message_parameterized": "False",
19+
"message_source": "exception"
20+
}
21+
}
22+
---
23+
contributing variants:
24+
system*
25+
hash: "93b26686d00504b4e5aa1cb0244d8b37"
26+
contributing component: chained-exception
27+
component:
28+
system*
29+
chained-exception*
30+
exception*
31+
type*
32+
"InnerException"
33+
value*
34+
"Nope"
35+
exception*
36+
type*
37+
"System.AggregateException"
38+
value*
39+
"One or more errors occurred."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
created: '2025-06-18T22:48:16.307691+00:00'
3+
creator: sentry
4+
source: tests/sentry/grouping/test_grouphash_metadata.py
5+
---
6+
hash_basis: message
7+
hashing_metadata: {
8+
"message_parameterized": false,
9+
"message_source": "exception"
10+
}
11+
---
12+
metrics with tags: {
13+
"grouping.grouphashmetadata.event_hash_basis": {
14+
"hash_basis": "message",
15+
"is_hybrid_fingerprint": "False"
16+
},
17+
"grouping.grouphashmetadata.event_hashing_metadata.message": {
18+
"message_parameterized": "False",
19+
"message_source": "exception"
20+
}
21+
}
22+
---
23+
contributing variants:
24+
system*
25+
hash: "028157fe357e4592e39eacb32eafa2db"
26+
contributing component: chained-exception
27+
component:
28+
system*
29+
chained-exception*
30+
exception*
31+
type*
32+
"InnermostException"
33+
value*
34+
"Whoops"
35+
exception*
36+
type*
37+
"InnerException"
38+
value*
39+
"Nope"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
created: '2025-06-18T22:48:16.678037+00:00'
3+
creator: sentry
4+
source: tests/sentry/grouping/test_grouphash_metadata.py
5+
---
6+
hash_basis: message
7+
hashing_metadata: {
8+
"message_parameterized": false,
9+
"message_source": "exception"
10+
}
11+
---
12+
metrics with tags: {
13+
"grouping.grouphashmetadata.event_hash_basis": {
14+
"hash_basis": "message",
15+
"is_hybrid_fingerprint": "False"
16+
},
17+
"grouping.grouphashmetadata.event_hashing_metadata.message": {
18+
"message_parameterized": "False",
19+
"message_source": "exception"
20+
}
21+
}
22+
---
23+
contributing variants:
24+
system*
25+
hash: "93b26686d00504b4e5aa1cb0244d8b37"
26+
contributing component: chained-exception
27+
component:
28+
system*
29+
chained-exception*
30+
exception*
31+
type*
32+
"InnerException"
33+
value*
34+
"Nope"
35+
exception*
36+
type*
37+
"System.AggregateException"
38+
value*
39+
"One or more errors occurred."
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
created: '2024-12-17T22:49:58.037297+00:00'
2+
created: '2025-06-17T23:22:34.827355+00:00'
33
creator: sentry
44
source: tests/sentry/grouping/test_grouphash_metadata.py
55
---

0 commit comments

Comments
 (0)