From 3e4e256a950d82133db3d3ed367a6f7791cf5222 Mon Sep 17 00:00:00 2001 From: Brian Caswell Date: Fri, 16 Oct 2020 22:03:39 -0400 Subject: [PATCH] limit size of error log saved as a Task Error --- src/api-service/__app__/agent_events/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api-service/__app__/agent_events/__init__.py b/src/api-service/__app__/agent_events/__init__.py index 70ae2b6c37..814912bc1b 100644 --- a/src/api-service/__app__/agent_events/__init__.py +++ b/src/api-service/__app__/agent_events/__init__.py @@ -168,8 +168,8 @@ def on_worker_event(machine_id: UUID, event: WorkerEvent) -> None: code=ErrorCode.TASK_FAILED, errors=[ "task failed. exit_status:%s" % exit_status, - event.done.stdout, - event.done.stderr, + event.done.stdout[-4096:], + event.done.stderr[-4096:], ], ) )