Commit 6ed1f7f
authored
ref(grouping): Small parameterization refactor (#109690)
This is a small refactor to our message parameterization code, to make it a little easier to understand. Aside from a few renames and some added/tweaked comments, the main changes here are:
- Make it so that `ParameterizationRegex.experimental_pattern` is `None` if there's no experimental pattern, rather than having it fall back to using the regular pattern. The fallback is now done in the creation of `EXPERIMENTAL_PARAMETERIZATION_REGEXES_MAP`.
- Make the behavior of `Parameterizer.parametrize_w_regex` match its docstring by a) making it take in a regex (as its docstring says it does), and b) removing the (non-existent) callback parameter from the docstring.
- Add a few test cases.
- Skip the test testing experimental patterns if there are none.1 parent 3c3133e commit 6ed1f7f
File tree
2 files changed
+56
-34
lines changed- src/sentry/grouping
- tests/sentry/grouping
2 files changed
+56
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
| |||
24 | 18 | | |
25 | 19 | | |
26 | 20 | | |
27 | | - | |
| 21 | + | |
28 | 22 | | |
29 | 23 | | |
30 | | - | |
31 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
32 | 28 | | |
33 | | - | |
| 29 | + | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | 33 | | |
39 | 34 | | |
40 | | - | |
| 35 | + | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
| |||
198 | 193 | | |
199 | 194 | | |
200 | 195 | | |
201 | | - | |
202 | | - | |
| 196 | + | |
203 | 197 | | |
204 | 198 | | |
| 199 | + | |
| 200 | + | |
205 | 201 | | |
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
209 | | - | |
210 | | - | |
| 205 | + | |
211 | 206 | | |
212 | 207 | | |
213 | 208 | | |
214 | 209 | | |
215 | 210 | | |
| 211 | + | |
| 212 | + | |
216 | 213 | | |
217 | 214 | | |
218 | 215 | | |
219 | 216 | | |
220 | 217 | | |
| 218 | + | |
221 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
222 | 223 | | |
223 | | - | |
| 224 | + | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
230 | | - | |
231 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
| 249 | + | |
| 250 | + | |
243 | 251 | | |
244 | 252 | | |
245 | 253 | | |
| |||
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
271 | | - | |
| 279 | + | |
272 | 280 | | |
273 | | - | |
| 281 | + | |
274 | 282 | | |
275 | | - | |
| 283 | + | |
276 | 284 | | |
277 | | - | |
278 | 285 | | |
279 | | - | |
| 286 | + | |
280 | 287 | | |
281 | 288 | | |
282 | 289 | | |
| |||
289 | 296 | | |
290 | 297 | | |
291 | 298 | | |
292 | | - | |
| 299 | + | |
293 | 300 | | |
294 | | - | |
295 | | - | |
| 301 | + | |
| 302 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
61 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
65 | | - | |
| 72 | + | |
66 | 73 | | |
67 | | - | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
112 | 119 | | |
113 | 120 | | |
114 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
115 | 126 | | |
116 | 127 | | |
117 | 128 | | |
| |||
145 | 156 | | |
146 | 157 | | |
147 | 158 | | |
148 | | - | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| |||
155 | 166 | | |
156 | 167 | | |
157 | 168 | | |
158 | | - | |
| 169 | + | |
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
| |||
164 | 175 | | |
165 | 176 | | |
166 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
167 | 182 | | |
168 | | - | |
| 183 | + | |
169 | 184 | | |
170 | 185 | | |
171 | 186 | | |
| |||
0 commit comments