From 65db6e3b08daa21bc8cc73614896a1a08005b12d Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 27 Mar 2024 15:55:00 +0100 Subject: [PATCH] wpt: Limit the console output sent to the intermittent tracker (#31895) This is a speculative fix for #31845. Instead of sending all of the output to the dashboard, send just the first 1024 characters. This value can be adjusted in the future if it is too large or too small. Fixes #31845. --- python/wpt/run.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/wpt/run.py b/python/wpt/run.py index e9944131078..7708bb18362 100644 --- a/python/wpt/run.py +++ b/python/wpt/run.py @@ -31,6 +31,7 @@ CERTS_PATH = os.path.join(WPT_TOOLS_PATH, "certs") TRACKER_API = "https://build.servo.org/intermittent-tracker" TRACKER_API_ENV_VAR = "INTERMITTENT_TRACKER_API" TRACKER_DASHBOARD_SECRET_ENV_VAR = "INTERMITTENT_TRACKER_DASHBOARD_SECRET" +TRACKER_DASHBOARD_MAXIMUM_OUTPUT_LENGTH = 1024 def set_if_none(args: dict, key: str, value): @@ -235,7 +236,10 @@ class TrackerDashboardFilter(): 'expected': result.expected, 'actual': result.actual, 'time': result.time // 1000, - 'message': result.message, + # Truncate the message, to avoid issues with lots of output causing "HTTP + # Error 413: Request Entity Too Large." + # See https://github.com/servo/servo/issues/31845. + 'message': result.message[0:TRACKER_DASHBOARD_MAXIMUM_OUTPUT_LENGTH], 'stack': result.stack, } if isinstance(result, UnexpectedSubtestResult):