Skip to content

Commit 4f78fa3

Browse files
committed
ci(mirror): 单资产 cap 3min + 镜像段 10min 硬顶
按 review 定档: - `MIRROR_UPLOAD_TIMEOUT` 120 → **180s**。mcpp 最大资产约 30MB(单包不超 100M), 3 分钟还没传完不是「慢」是「卡住」,不值得继续占 CI —— 跳过并由本地补传 (gate 会打印确切的补传命令)。 - Mirror 步骤加 **`timeout-minutes: 10`** 硬顶。健康的 run 远在此之内;10min 是 兜底,防止某一端病态时烧光 job 预算(v0.0.94 就是 30min 挂死且零可见性)。
1 parent 60e20ec commit 4f78fa3

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/tools/mirror_res.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ info() { echo "[mirror] $*"; }
5555
# completeness gate at the bottom is still the pass/fail, so a skipped asset
5656
# fails the release loudly instead of silently shipping a half mirror.
5757
#
58-
# Raise it (or set it per-host) when the cross-border leg legitimately needs
59-
# longer than the cap for the big archives; the gate will tell you.
60-
: "${MIRROR_UPLOAD_TIMEOUT:=120}"
58+
# Sizing: mcpp's largest asset is ~30MB (no package exceeds 100MB). 180s is a
59+
# generous ceiling for that — an upload still running at 3min is not "slow", it
60+
# is stuck, and the right move is to stop paying CI for it and push that one
61+
# asset by hand (the gate below prints the exact command).
62+
: "${MIRROR_UPLOAD_TIMEOUT:=180}"
6163

6264
DL="$(mktemp -d)"; trap 'rm -rf "$DL"' EXIT
6365

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,13 @@ jobs:
725725

726726
- name: Mirror binaries to xlings-res/mcpp (gh + gtc)
727727
if: ${{ env.XLINGS_RES_TOKEN != '' }}
728+
# Hard ceiling for the whole mirror segment. The script caps each asset
729+
# at MIRROR_UPLOAD_TIMEOUT (180s) and abandons anything slower, so a
730+
# healthy run lands well inside this; 10min is the backstop that keeps a
731+
# pathological host from burning the job's budget the way v0.0.94 did
732+
# (30min, killed, zero per-asset visibility). Whatever gets skipped is
733+
# reported by name + size and pushed by hand.
734+
timeout-minutes: 10
728735
env:
729736
GH_TOKEN: ${{ secrets.XLINGS_RES_TOKEN }}
730737
run: |

0 commit comments

Comments
 (0)