fix(artifact): 在线文档大小预检只对普通文件生效,压测暴露的取件器错误映射补齐
build / build (push) Successful in 25s

- 大小预检此前对 adoc/axls 也用目录大小,而在线文档目录大小是容器大小
  (实测有 1.40GB 的 adoc,导出 docx 仅 49.5MB)→ 3 个可导出文档被误判 over_limit
- axls 转换器的 dws 失败改为抛 DwsCallError,取件器映射成平台错误码
  (此前进程无结果退出,平台只看到 artifact_fetch_no_output)
- export_failed 改判 retryable:8 路混合时巨型文档服务端导出偶发失败,1/2/4 路与串行必成
- 新增 2 个回归测试 + dws_error_map 1 个断言;文档补并发实测表与回归清单
This commit is contained in:
姚章浩
2026-10-09 11:51:26 +08:00
parent 6f16c3af20
commit 6496ee3571
6 changed files with 113 additions and 17 deletions
+10 -1
View File
@@ -1,8 +1,12 @@
#!/usr/bin/env python3
"""dws_error_map 单测:全部使用本轮实测捕获的真实 dws 错误体(不改写、不简化)。"""
import json
import os
import sys
sys.path.insert(0, "/home/zheromiku/dws_test/bridge")
# 测的是仓库里的实现(脚本目录),bridge/ 只是本轮评估期的开发副本
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
if not os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), "dws_error_map.py")):
sys.path.insert(0, "/home/zheromiku/dws_test/bridge")
from dws_error_map import classify
# —— 真实样本(逐字来自本轮会话的工具输出)——
@@ -68,6 +72,11 @@ CASES = [
{"category": "api", "code": 1, "message": "DingTalk export job timed out after 120s"},
("export_timeout", True, False)),
("导出任务失败(并发压测实测:同一节点 8 路偶发失败、1/2/4 路及串行必成)",
{"error": {"category": "api", "code": 1, "message": "提交导出任务失败: 钉钉导出任务失败",
"server_error_code": "internalError"}},
("export_failed", True, False)),
("未分类错误 → 不得默认可重试",
{"category": "internal", "code": 9, "message": "something nobody has seen before"},
("unknown", False, False)),