build: retry a fetch that failed on a brief upstream outage - #243
Merged
Conversation
2026-08-12 那轮 unstable 因为 `net-misc/reframe` 取源失败而没有发布。日志是 连上 GitHub 之后 `No data received`,portage 在十秒内试了三次就放弃。事后从 建置机与本机各取三次都是 200,大小与 Manifest 完全相符,tag 也在——上游只是 抖了一下。 代价却是整个频道停发一天:包没建出来,索引就少一条,版本核对因此拒绝发布。 拒绝是对的,那一轮若照 433 条发出去,退役步骤会删掉镜像上仍然可用的 `reframe-1.20.0-1.gpkg.tar`,使用者会因为几秒钟的抖动少一个包。 所以改在更前面:逐包建置结束后,把取源失败的包隔 `FETCH_RETRY_WAIT` 秒重试 一轮,成功的从 `failed.txt` 与 `failed` 数组里移除。只重试取源失败,只做一轮。 分类器另外分出`上游暂时不可用`:连上之后才出问题的,URL 与 ebuild 都没错, 归成 ebuild 要修会害人去改一个没坏的档案。确实 404 的仍然归给 ebuild。
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.
2026-08-12 那轮 unstable 因为
net-misc/reframe取源失败没有发布。日志是连上 GitHub 之后No data received,portage 在十秒内试三次就放弃。事后从建置机与本机各取三次都是 200,大小与 Manifest 相符——上游只是抖了一下。代价是整个频道停发一天:包没建出来,索引少一条,版本核对因此拒绝发布。拒绝是对的,那一轮若照 433 条发出去,退役步骤会删掉镜像上仍然可用的
reframe-1.20.0-1.gpkg.tar。改动
build-container.sh:逐包建置结束后,把取源失败的包隔FETCH_RETRY_WAIT(默认 180 秒)重试一轮,成功的从failed.txt与failed数组移除。只重试取源失败,只做一轮。classify-failures.py:分出「上游暂时不可用」一类。连上之后才出问题的,URL 与 ebuild 都没错,原先归成 ebuild 要修,会害人去改一个没坏的档案。确实 404 的仍然归给 ebuild。测试
新增
tests/test-fetch-retry.sh,把重试区块从build-container.sh切出来对着 emerge stub 执行,11 项断言涵盖恢复与仍然不通两种情况,已接入 CI。变异反证 4 项全部转红:整段拿掉、成功不清failed.txt、成功不更新failed数组、不看失败原因一律重试。test-classify-failures.py补了三项,用当晚 reframe 的真实日志与一份真 404 分别核对。