Repository navigation
fix(sync): never re-push unchanged images to docker.io (dest live-inspect fallback + old cache format transition) - #154
Merged
Conversation
…pect fallback + old cache format transition)
Contributor
Author
review 补充:Docker Hub 拉取配额保护日志证实配额为
已加配额预算(fbe3e57):
冷恢复收敛速度:cann 全缓存丢失时约 937/150 ≈ 7 轮(小时级)恢复;日常路径(缓存热)兜底零调用、零配额消耗。 |
This was referenced Nov 26, 2026
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.
背景(事故)
#153 修 mindie 前缀碰撞时把缓存 key 分隔符从
-改成#,导致所有旧格式缓存条目失配 → 冷启动 → docker.io 目的地跳过逻辑只信缓存 → 今天 11:25~11:50 对 35 个docker.io/ascendai/*仓库约 965 个 tag 全量重 PUT manifest(digest 未变,但 Docker Hub last_updated 时间戳被刷新一次)。教训:老逻辑其实不会重推(主 key 前缀匹配一直在生效,我最初"缓存从未生效"的诊断有误);#153 的方案选错了——应该渐进迁移而不是格式干净切换。已在 11:57 取消了正在冷推
docker.io/ascendai/cann(937 tag)的 job(取消时还在 swr skip 阶段,0 个重推),pending 的 vllm-ascend/triton/manylinux 冷推 job 也一并取消。修复(两道防线)
1. dest 实时兜底(硬保证,核心)
docker.io 目的地缓存未命中(冷启动/淘汰/格式迁移)时,不再直接 copy,而是先实时 inspect dest:
⏭️ Skip (dest digest match; cache healed),跳过并回写缓存自愈从此不变式成立:重 PUT manifest 只发生在 dest 缺 tag 或 digest 确实不同时。缓存从"正确性依据"降级为"性能优化"——缓存坏了最多多几次 API 调用,绝不会重推未变更的镜像、不会刷新时间戳。
2. 旧缓存格式过渡(消除存量冷启动)
restore-keys 增加第二行旧格式前缀:
尚未重建新缓存的 src(cann / vllm-ascend / triton / manylinux 等)恢复命中旧条目 → 不再冷推。mindie 的旧格式回退可能取错归档(原 bug),但文件名对不上会回落空缓存,再由防线 1 的实时兜底接住——不重推。
验证
Skip (dest digest match; cache healed)或Skip (cache),0 synced请求尽快合入
下一次定时触发在 12:23 UTC(20:23 北京)。合入前触发的话,cann 等未重建缓存的 src 还会冷推一次;合入后此风险结构性消除。