From 07223b6b4a811cdda4e651e3e07d3068f176c0a6 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Fri, 7 Aug 2026 15:18:42 +0800 Subject: [PATCH] fix(staging): extend Gitea publish timeout --- .gitea/workflows/backend-quality-gate.yml | 2 +- docs/BUG_HISTORY.md | 16 ++++++++++++++++ frontend/tests/staging-backend-workflows.test.ts | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/backend-quality-gate.yml b/.gitea/workflows/backend-quality-gate.yml index 39ba19c4..6dcaf261 100644 --- a/.gitea/workflows/backend-quality-gate.yml +++ b/.gitea/workflows/backend-quality-gate.yml @@ -192,7 +192,7 @@ jobs: if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/staging' needs: validate runs-on: manman-linux - timeout-minutes: 45 + timeout-minutes: 60 env: GITEA_SHA: ${{ gitea.sha }} GITEA_RUN_ATTEMPT: ${{ gitea.run_attempt }} diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 0f2bb5f1..e6bb26c2 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -2426,3 +2426,19 @@ - 修复:按列类型将查询结果中的 `DATE` 归一化为本地日历字符串,timestamp 仍保持 `Date`;同步删除 legacy rectification 后的 account stale test。 - 验证:focused 回归 37/37、完整前端 1017/1017、local quick quality gate 291 passed/1 skipped;TypeScript、lint(0 error)、production build 与 `git diff --check` 通过。 - 修复版本:本次 staging-only 集成候选 + +## BUG-142 | Gitea staging publish job Run 1540 post-job timeout + +- 状态:resolved(local candidate) +- 首次发现:2026-08-07 +- 最近更新:2026-08-07 +- 影响面:Gitea `Staging Backend Quality Gate` publish job;validate、exact-SHA 与安全校验未修改,production 未涉及。 +- 用户现象:Run 1540 在发布步骤完成后进入 post-job timeout,质量门禁未能正常收口。 +- 触发条件:publish job 的 45 分钟 job timeout 不足以覆盖发布后的收尾阶段。 +- 根因:publish job 与 validate job 共用 45 分钟上限,未为发布收尾保留独立余量。 +- 修复:仅将 `.gitea/workflows/backend-quality-gate.yml` 的 publish timeout 从 45 分钟调整为 60 分钟;validate 仍为 45 分钟,安全检查与 exact-SHA 行为保持不变。 +- 验证:新增合同断言区分 validate=45 与 publish=60;聚焦 staging workflow test、YAML 解析和 `git diff --check` 通过;未 push、deploy 或触碰 production。 +- 防复发:合同测试必须同时锁定 validate 与 publish 的 job timeout,避免发布收尾预算被误改。 +- 相关记录:BUG-136 +- 复发自:无 +- 修复版本:本次提交(staging-only) diff --git a/frontend/tests/staging-backend-workflows.test.ts b/frontend/tests/staging-backend-workflows.test.ts index 02bbb5e2..3019e20f 100644 --- a/frontend/tests/staging-backend-workflows.test.ts +++ b/frontend/tests/staging-backend-workflows.test.ts @@ -125,6 +125,7 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest", assert.match(workflow, /push:\n\s+branches: \[staging\]/); assert.match(workflow, /workflow_dispatch:/); assert.equal((workflow.match(/runs-on: manman-linux/g) ?? []).length, 2); + assert.match(workflow, /validate:[\s\S]*?timeout-minutes: 45[\s\S]*?publish:[\s\S]*?timeout-minutes: 60/); assert.match(workflow, /GITEA_SHA: \$\{\{ gitea\.sha \}\}/); assert.equal((workflow.match(/git clean -ffdx/g) ?? []).length, 2); assert.equal((workflow.match(/git status --porcelain --untracked-files=all/g) ?? []).length, 2);