From e27655784f4c17075b0fe3a513efb8fa46226a62 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 Jul 2026 13:08:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Z1=20=E8=AF=A6=E7=BB=86=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E8=A7=A3=E6=9E=90=20=E2=80=94=20Board=20X=20has=20N?= =?UTF-8?q?=20domains=20=E5=A4=B4=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Z1 详细 test_server 输出使用 'Board X has N domains' 格式而非 'Logic drawer X has N domains',导致逐域归属数据(domain_details) 未被解析,邮件中缺少用户-LD 板统计。修复后 Z1/Z2 两种格式均可解析。 --- app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 4e69ec6..0738d35 100644 --- a/app.py +++ b/app.py @@ -238,8 +238,10 @@ def parse_test_server_output(raw_text: str) -> dict: }) continue - # "Logic drawer X has N domains Logic drawer: ONLINE" 行 - ld_header = re.match(r"Logic\s+drawer\s+(\d+)\s+has\s+(\d+)\s+domains", line) + # "Logic drawer X has N domains" (Z2) 或 "Board X has N domains" (Z1 详细输出) + ld_header = re.match( + r"(?:Logic\s+drawer|Board)\s+(\d+)\s+has\s+(\d+)\s+domains", line + ) if ld_header and result["racks"] and result["racks"][-1]["clusters"]: ld_num = int(ld_header.group(1)) # 找到对应的 board