fix(ci): buildx本地缓存损坏自动检测+清理重试,根治snapshot not found连锁失败 #523
Reference in New Issue
Block a user
Delete Branch "fix/buildx-local-cache-corruption"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
Web构建连续多轮失败,错误:
parent snapshot sha256:xxx does not exist根因是runner本地
/tmp/buildx-cache/目录里的buildx本地缓存(snapshot)损坏了,每次构建都从本地坏缓存读,直接炸。API和Worker没挂是因为它们的缓存没坏,但Web那个缓存目录从#518那次开始坏了,之后所有Web构建连锁失败。
修复
scripts/ci/docker_build_push.sh新增build_with_cache_retry()函数:非缓存类错误(代码问题等)直接透传,不误重试。
效果
🚀 预览环境已部署
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #523 已关闭或合并,对应的预览环境已被清理。