Repository navigation
ci: 发版回查窗口从 4 分钟放到 10 分钟 - #10
Merged
Merged
Conversation
0.9.2 打标签那次,npm publish 报告成功,回查等满 4 分钟仍没查到,流水线判失败, 于是 release job 没启动,GitHub Release 一直没建出来。事后核对:0.9.2 在 registry 上现身的时间是 11:40:37Z,只比 4 分钟的窗口晚 11 秒——包本身没有任何问题。 4 分钟的窗口贴着 CDN 抖动的上限,继续用下去每次发版都可能随机假红。改成 60 × 10s, 失败文案与日志里的 i/N 一起跟着改,免得下次有人只改一半。 测试里新增三条断言:窗口至少 10 分钟;失败文案写的分钟数与循环次数换算出来的一致; 日志里的 i/N 与实际次数一致。把循环次数单独改回 24 再跑,这三条里有一条立刻失败。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么改
0.9.2 打标签那次的流水线(run 43418320680):
而 npm 上
dsh-cura@0.9.2的时间戳是 11:40:37Z —— 只比 4 分钟的窗口晚 11 秒。包本身没有任何问题,是流水线把 CDN 延迟判成了发版失败,并连带让 GitHub Release 没被创建。4 分钟的窗口贴着 CDN 抖动的上限,继续用下去每次发版都可能随机假红。
怎么改的
超时仍然判失败,只是把「真没上去」的门槛往后挪,没有把失败降级成 warning。
测试
tests/test-release-body.mjs里原来的两条断言把seq 1 24写死了,等于把「窗口 4 分钟」也锁住了。改成从 YAML 里换算,并新增三条:第 i/N 次的 N == 实际循环次数。变异自证:把循环次数单独改回 24(文案仍是 10 分钟),这组断言立刻报 3 条 FAIL;还原后全部通过。
本地
node tests/all.mjs→ 9 套全过(25129ms)。影响面
只动
.github/workflows/release.yml与它对应用例,不碰插件运行时。已经在 registry 上的 0.9.2 不受影响;这次合并后,重跑 release 流水线就能补建 GitHub Release。