File tree Expand file tree Collapse file tree 5 files changed +16
-14
lines changed
tests/sentry/incidents/utils Expand file tree Collapse file tree 5 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 55
66from sentry .incidents .utils .types import QuerySubscriptionUpdate
77from sentry .search .eap .utils import add_start_end_conditions
8- from sentry .search .events . datasets . discover import InvalidIssueSearchQuery
8+ from sentry .search .exceptions import InvalidIssueSearchQuery
99from sentry .snuba .dataset import Dataset
1010from sentry .snuba .entity_subscription import (
1111 ENTITY_TIME_COLUMNS ,
Original file line number Diff line number Diff line change 6464from sentry .search .events import constants as qb_constants
6565from sentry .search .events import fields
6666from sentry .search .events import filter as event_filter
67- from sentry .search .events .datasets .discover import InvalidIssueSearchQuery
6867from sentry .search .events .filter import to_list
6968from sentry .search .events .types import SAMPLING_MODES , SnubaParams
69+ from sentry .search .exceptions import InvalidIssueSearchQuery
7070
7171
7272def collect_issue_short_ids_from_parsed_terms (terms : Sequence [object ]) -> set [str ]:
Original file line number Diff line number Diff line change 9595)
9696from sentry .search .events .filter import to_list
9797from sentry .search .events .types import SelectType , WhereType
98+ from sentry .search .exceptions import InvalidIssueSearchQuery
9899from sentry .search .utils import DEVICE_CLASS
99100from sentry .snuba .dataset import Dataset
100101from sentry .snuba .referrer import Referrer
101102from sentry .utils .numbers import format_grouped_length
102103
103104
104- class InvalidIssueSearchQuery (InvalidSearchQuery ):
105- """Raised when an issue filter references non-existent issue IDs."""
106-
107- def __init__ (self , invalid_ids : list [str ]):
108- self .invalid_ids = invalid_ids
109- super ().__init__ (f"Issue IDs do not exist: { invalid_ids } " )
110-
111- def __str__ (self ) -> str :
112- return f"Issue IDs do not exist: { self .invalid_ids } "
113-
114-
115105class DiscoverDatasetConfig (DatasetConfig ):
116106 custom_threshold_columns = {
117107 "apdex()" ,
Original file line number Diff line number Diff line change 1+ from sentry .exceptions import InvalidSearchQuery
2+
3+
4+ class InvalidIssueSearchQuery (InvalidSearchQuery ):
5+ """Raised when an issue filter references non-existent issue IDs."""
6+
7+ def __init__ (self , invalid_ids : list [str ]):
8+ self .invalid_ids = invalid_ids
9+ super ().__init__ (f"Issue IDs do not exist: { invalid_ids } " )
10+
11+ def __str__ (self ) -> str :
12+ return f"Issue IDs do not exist: { self .invalid_ids } "
Original file line number Diff line number Diff line change 55
66from sentry .incidents .utils .process_update_helpers import get_aggregation_value
77from sentry .incidents .utils .types import QuerySubscriptionUpdate
8- from sentry .search .events . datasets . discover import InvalidIssueSearchQuery
8+ from sentry .search .exceptions import InvalidIssueSearchQuery
99from sentry .snuba .dataset import Dataset
1010from sentry .snuba .entity_subscription import get_entity_subscription_from_snuba_query
1111from sentry .snuba .models import SnubaQuery , SnubaQueryEventType
You can’t perform that action at this time.
0 commit comments