pr 超时:git/gh 子进程默认 120 秒超时,超时转 502 不挂 handler

此前 /pr 的子进程调用没有超时:远端通路卡死时 handler
线程永久挂住,客户端断开也收不回来。_run 真实路径一律
带 timeout(默认 120 秒,CLOUD_PR_SUBPROCESS_TIMEOUT
可改,非法值回落默认),超时杀子进程、返回 124,调用方
按原有失败路径处理(push/pr_create/commit 抛 PrStepError,
探针按跳过处理)。App 路径的 GitHub API 调用已有 30 秒
超时,本次不动。测试:真实 sleep 超时 2 个、环境变量
2 项、超时映射 push/commit 2 个
This commit is contained in:
host committed 2026-10-26 17:01:47 +08:00
1 parent 37d049d6b7
commit f73c3f7a05
3 files changed
+188 -5

No files matched your search

+5 -1
View File
@@ -849,7 +849,11 @@ interrupted 且终态任务 cancel 返回 400、心跳后 sweep 不扫刚心跳
(先读仓库 default_branch 当 base,不猜 main);没有安装
记录或换 token 失败时自动回落原来的 gh + PAT 路径
(auth_via=pat),不因此报错;App 没装的仓库与 gh 路径
的行为与原来完全一致。push 或 pr create
的行为与原来完全一致。子进程超时:push、pr create、
commit、remote 查询、gh 检查全部走带超时的子进程调用
(默认 120 秒,`CLOUD_PR_SUBPROCESS_TIMEOUT` 可改);
远端通路卡死时 handler 线程在时限内结束、返回 502,
任务保持 merged、可安全重调,不再永久挂住。push 或 pr create
失败时返回 502 且错误文本写清是哪一步(commit、push 还是
pr_create),
任务状态保持 merged 不变,绝不把任务标 failed。顺序:任务