perf(ci): 恢复registry cache-to写入,ACR已改为tag可变 #681
Reference in New Issue
Block a user
Delete Branch "opt/restore-registry-cache-to"
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?
背景
ACR缓存仓库(api-cache/worker-cache/web-cache)已从tag不可变改为tag可变,现在可以安全地写入registry缓存了。
改动
--cache-to type=registry写入ignore-error=true作为兜底(防止ACR配置回退导致构建失败)--cache-from的ignore-error去掉了(tag可变后正常写入不会读不到)预期收益
验证
代码审查结果 - PR #681
⚠️ 问题(2个需要修改)
--cache-from中的ignore-error=true参数。这会导致当 Registry 缓存镜像不存在(如首次构建)或网络不可达时,构建命令直接失败,无法优雅降级到仅使用本地缓存。ignore-error=true,存在相同的构建中断风险。💡 建议(1个可选)
--cache-to type=registry,mode=max,这将把构建缓存推送到 Registry。虽然实现了缓存共享,但会增加构建时间和网络负载。请确认这是否与之前注释中提到的 "M-2优化:解决registry缓存导入慢(247s)" 目标冲突,避免引入新的性能瓶颈。✅ 格式检查通过 | ❌ 逻辑审查需修改 | ⚠️ 建议关注性能
🤖 由 AI 代码审查机器人自动生成 | 2026-07-21 14:02:00 | 模型:
PG连接问题已修复,4个门禁全绿,approved.
PG连接问题已修复,4个门禁全绿,批准合并。
🗑️ 预览环境已清理
PR #681 已关闭或合并,对应的预览环境已被清理。