fix(data_export): Cap export row limit at 10k for all callers#116048
Conversation
Apply a hard 10k row cap in DataExportEndpoint._parse_limit so every
request: UI, API tokens, agents; is bounded regardless of dataset.
Requests with no limit or with limit > 10k are clamped to 10k.
Larger exports were both unreliable in practice ("broken and hammers
infrastructure") and unnecessary as a self-serve path: GDPR
data-portability requests are handled out-of-band via
sentry.io/contact/gdpr/.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7852453. Configure here.
wmak
left a comment
There was a problem hiding this comment.
Can you add a test for this, and maybe a docstring somewhere explaining why
|
Just confirming: we'll want a frontend change to remove the 50k and >=50k "all" option from the modal, right? (that's straightforward to do, and I can tackle in a separate PR quickly if that's right). |
Yes, if "all" means full logs export; that is clamped to 10k. |
Corresponds to #116048. Closes LOGS-823.

Apply a hard 10k row cap in DataExportEndpoint._parse_limit so every request that is not from UI, is bounded regardless of dataset. Requests with no limit or with limit > 10k are clamped to 10k.
Larger exports were both unreliable in practice ("broken and hammers infrastructure") and unnecessary as a self-serve path: GDPR data-portability requests are handled out-of-band via sentry.io/contact/gdpr/.
Callout: