diff --git a/, b/, new file mode 100644 index 000000000..e69de29bb diff --git a/services/ui_backend_service/api/run.py b/services/ui_backend_service/api/run.py index a73c3c587..e0a477942 100644 --- a/services/ui_backend_service/api/run.py +++ b/services/ui_backend_service/api/run.py @@ -100,6 +100,10 @@ async def get_all_runs(self, request): # due to lack of pg statistics on JSONB fields. To battle this, first execute # subquery of ordered list from runs_v3 table in and filter by tags on outer query. # This needs more research in the future to further improve performance. + _, limit, offset, _, _, _ = pagination_query(request) + + # Prevent very large payloads + limit = min(limit, 100) builtin_conditions, _ = builtin_conditions_query(request) has_tag_filter = len([s for s in builtin_conditions if 'tags||system_tags' in s]) > 0 if has_tag_filter: