Repository navigation
fix(sync): move concurrency from workflow level to per-src job level - #152
Merged
Merged
Conversation
Goalina
added a commit
that referenced
this pull request
Nov 26, 2026
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.
问题
concurrency目前挂在 workflow 级(sync-images-${{ github.ref }}):只要矩阵里任何一个慢 job 在跑,整个 run 就算 in progress,下一次定时触发只能 pending 排队。慢源会"连坐"所有快镜像。实例(run
45738874200,11-26 01:54):46 个 job 在 535 分钟内完成,但09:23 的 7 次定时触发因 run 长期占用并发组,一次都没创建。atlas_inference/vllm-ascend跑了 1h15m,整个 run 被拖到 03:09 才结束;期间 02:50 手动触发的新同步(含新镜像)一直 pending,其他本来几分钟就能同步完的镜像全被卡住。当天 03:23修改
concurrencysyncjob 上加 job 级并发控制,按matrix.src分组:group: sync-images-${{ matrix.src }},cancel-in-progress: false(job 级 concurrency 支持
matrix上下文,官方文档 jobs.<job_id>.concurrency 允许的上下文含 matrix)效果
queue: single),跑完即接上,节奏 ≈ 自身耗时 + ≤1hreview 补充说明
github.ref(review 后调整):workflow_dispatch可从任意分支跑,带 ref 会让「同 src 不并发」在跨 ref 场景被绕过(分支手动跑与 main 定时跑并发写同一批 dest registry)。去掉 ref 换取硬互斥,代价是分支上手动跑同一 src 时要排队等 main 的 job,取舍已写在 workflow 注释里。queue: single下,被更新的 pending 顶掉的 job 会以cancelled收场(正常替换,非失败)。如果对 run cancelled 有告警,需把这类情况排除,避免每小时误报。-run_id后缀且 restore 无restore-keys),缓存从未生效过——docker.io 目的地每次都在全量 re-copy。该问题与本 PR 无关,另开 PR 修复。验证
cancel-in-progress: false保持不变(防慢源每次被新触发打断、永远跑不完)