Skip to content

Commit 346c62a

Browse files
scttcperandrewshie-sentry
authored andcommitted
fix(seer): Remove pagination from anomaly detection (#103253)
We send this endpoint the entire payload and it has the full response from seer, instead of paginating, return the entire response. fixes https://getsentry.atlassian.net/browse/ACI-532
1 parent 8d4efb6 commit 346c62a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/sentry/seer/endpoints/organization_events_anomalies.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from sentry.api.bases.organization import OrganizationAlertRulePermission
1010
from sentry.api.bases.organization_events import OrganizationEventsV2EndpointBase
1111
from sentry.api.exceptions import ResourceDoesNotExist
12-
from sentry.api.paginator import OffsetPaginator
1312
from sentry.api.serializers.base import serialize
1413
from sentry.apidocs.constants import (
1514
RESPONSE_BAD_REQUEST,
@@ -97,9 +96,4 @@ def post(self, request: Request, organization: Organization) -> Response:
9796
if anomalies is None:
9897
return Response("Unable to get historical anomaly data", status=400)
9998
# NOTE: returns empty list if there is not enough event data
100-
return self.paginate(
101-
request=request,
102-
queryset=anomalies,
103-
paginator_cls=OffsetPaginator,
104-
on_results=lambda x: serialize(x, request.user),
105-
)
99+
return Response(serialize(anomalies, request.user))

0 commit comments

Comments
 (0)