From 1f97714f9b247df18c8e7e1387dd1a4a5077acfe Mon Sep 17 00:00:00 2001 From: Kangyan-Zhou Date: Thu, 2 Apr 2026 19:30:55 -0700 Subject: [PATCH] [CI] Add timeouts to Slack upload urlopen and WebClient (#21903) Co-authored-by: Claude Opus 4.6 (1M context) --- python/sglang/multimodal_gen/test/slack_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/multimodal_gen/test/slack_utils.py b/python/sglang/multimodal_gen/test/slack_utils.py index 34ba78371..880417265 100644 --- a/python/sglang/multimodal_gen/test/slack_utils.py +++ b/python/sglang/multimodal_gen/test/slack_utils.py @@ -130,7 +130,7 @@ def upload_file_to_slack( try: suffix = os.path.splitext(urlparse(path).path)[1] or ".tmp" with tempfile.NamedTemporaryFile(delete=False, suffix=suffix) as tf: - with urlopen(path) as response: + with urlopen(path, timeout=30) as response: tf.write(response.read()) temp_paths.append(tf.name) final_origin_paths.append(tf.name) @@ -155,7 +155,7 @@ def upload_file_to_slack( f"*Case ID:* `{case_id}`\n" f"*Model:* `{model}`\n" f"*Prompt:* {prompt}" ) - client = WebClient(token=token) + client = WebClient(token=token, timeout=60) channel_id = "C0A02NDF7UY" thread_ts = None