mirror of
https://github.com/go-gitea/gitea.git
synced 2026-12-04 15:54:57 +00:00
Runners picked the waiting job that became ready first, so a job released by `needs` queued again behind jobs of newer runs, and a run with several stages waited out the backlog once per stage. Runners now pick waiting jobs in the order their runs were triggered, then by job id, so a run keeps its place across its stages, including reusable workflow children and dynamic matrix jobs created once their `needs` finish. A rerun is a new trigger and queues behind. Under load, a new push waits longer for its first job, and jobs released late by approval or a concurrency group go ahead of newer runs. The job queue page lists jobs in the same order, and the `pickup` index becomes `(task_id, status, run_attempt_id, id)` to serve it. Fixes: https://github.com/go-gitea/gitea/issues/40430 Assisted-by: Claude Code:claude-opus-5-5 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Zettat123 <zettat123@gmail.com>