Commit 4b36fbf
authored
fix(issue-search): correctly parse negated contains filters (#105699)
Fixes SENTRY-44YF
In some (very specific) queries, we fail to unpack issue search
conditions correctly. More specifically, when we have a negation, plus a
'contains' filter, plus wildcards, we end up with one too many levels of
nesting, leading to the error. We can unpack this condition to OR
everything together and handle it correctly.
My understanding is that a more thorough solution is to migrate the
issue search to use snql. I opted for this solution since it is
considerably simpler, and I don't see an easy way to do this migration.
example: `!title:[*test*,*test2*]`1 parent 0dc92ed commit 4b36fbf
File tree
2 files changed
+30
-3
lines changed- src/sentry/search/events
- tests/sentry/issues/endpoints
2 files changed
+30
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
674 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
675 | 685 | | |
676 | 686 | | |
677 | 687 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
406 | 423 | | |
407 | 424 | | |
408 | 425 | | |
| |||
0 commit comments