-
Notifications
You must be signed in to change notification settings - Fork 0
[CORRUPTED] Synthetic Benchmark PR #103379 - fix(search): Fix handle backslashes in wildcard operators #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: base_pr_103379_20251204_7852
Are you sure you want to change the base?
Conversation
When using one of the wildcard operators (contains, starts with, ends with), we need to make sure to properly escape backslashes in order to handle the search correctly.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Benchmark PR getsentry#103379
Type: Corrupted (contains bugs)
Original PR Title: fix(search): Fix handle backslashes in wildcard operators
Original PR Description: When using one of the wildcard operators (contains, starts with, ends with), we need to make sure to properly escape backslashes in order to handle the search correctly.
Original PR URL: getsentry#103379
PR Type
Bug fix, Tests
Description
Fix backslash handling in wildcard search operators (contains, starts_with, ends_with)
Add
handle_backslash()function to properly escape backslashes in search valuesUpdate escape character validation to allow backslash escaping
Add comprehensive tests for wildcard operators with backslash characters
Diagram Walkthrough
File Walkthrough
event_search.py
Add backslash escaping for wildcard operatorssrc/sentry/api/event_search.py
translate_wildcard_as_clickhouse_pattern()to allow backslash escapingby adding
"\\"to the allowed escape characters sethandle_backslash()function to properly escape backslashesin search values
handle_backslash()call intogen_wildcard_value()toprocess backslashes before applying wildcard operators
test_organization_group_index.py
Test wildcard operators with backslash characterstests/sentry/issues/endpoints/test_organization_group_index.py
test_wildcard_operator_with_backslash()test method to verifybackslash handling in user.username field searches
backslashes, and all three wildcard operators (contains, starts_with,
ends_with)
correctly matched across different query formats
test_organization_events_span_indexed.py
Test span wildcard operators with backslashestests/snuba/api/endpoints/test_organization_events_span_indexed.py
test_wildcard_operator_with_backslash()test method for spandescription field searches
patterns, and all three wildcard operators
correctly retrieved through various query formats