feat(actions): add build queue view - #38585
Open
bircni wants to merge 3 commits into
Open
Conversation
bircni
force-pushed
the
feat/actions-build-queue
branch
from
July 22, 2026 19:48
2aa2ddf to
f8da20b
Compare
Member
|
I don’t understand why this needs to be a separate jobs list. |
Member
|
I think we should have a global Jobs page under Actions, as well as an organization-level Jobs page. A repository-level Jobs page does not seem particularly useful. |
Member
Author
|
Currently completely redesigning it |
bircni
marked this pull request as draft
July 24, 2026 16:14
bircni
force-pushed
the
feat/actions-build-queue
branch
from
July 24, 2026 16:38
27b73ec to
42c0e0e
Compare
Add a build queue view that lists running and waiting Actions jobs in real runner-pickup order, with auto-refresh in place: - Instance-wide queue for site admins under the admin Actions section. - Per-repository queue in the repo Actions tab (Runs | Queue sub-nav). Admins can reorder waiting jobs by drag-and-drop, which changes the actual runner pickup order rather than just the view. Reordering is backed by an internal queue_rank column on ActionRunJob (0 = natural FIFO by updated,id; manually placed jobs get spaced ranks) applied consistently in the queued-jobs listing and in the CreateTaskForRunner keyset cursor. New jobs join the back of a curated queue and the order self-heals as jobs are claimed. Add migration v343 for the queue_rank column and a devtest page to exercise the queue list and reordering UI.
bircni
force-pushed
the
feat/actions-build-queue
branch
from
July 24, 2026 16:38
42c0e0e to
c43ea88
Compare
bircni
marked this pull request as ready for review
July 24, 2026 16:38
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an Actions build queue UI at both instance-admin and repository scope, backed by a persistent queue ordering mechanism so admins can reorder jobs in the actual runner pickup order.
Changes:
- Introduces queue views (admin and repo) with auto-refreshing “Running” and “Queued” job lists.
- Adds drag-and-drop reordering for admins, persisting order via a new
queue_rankonActionRunJob. - Updates runner task pickup to respect the new queue ordering; adds unit/integration coverage and DB migration.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web_src/js/features/repo-actions.ts | Registers/init queue list auto-refresh and drag-reorder POST for the UI fragment. |
| tests/integration/actions_queue_test.go | Integration coverage for viewing queue + permission-gated reordering. |
| templates/shared/actions/queue_list.tmpl | Shared queue list fragment (running + queued tables, reorder handle, pagination). |
| templates/repo/actions/queue.tmpl | New repo Actions “Queue” page wrapper. |
| templates/repo/actions/list.tmpl | Adds `Runs |
| templates/devtest/actions-queue.tmpl | Devtest page to exercise queue reorder UI without DB/runners. |
| templates/admin/navbar.tmpl | Adds admin nav entry for Actions Queue. |
| templates/admin/actions.tmpl | Renders the shared queue list for admin actions “queue” page type. |
| routers/web/web.go | Wires new admin and repo queue routes (+ devtest endpoints). |
| routers/web/shared/actions/runners.go | Implements queue query/rendering + reorder POST handler for admin/shared scopes. |
| routers/web/repo/actions/queue.go | Repo-scoped queue render + reorder handler (repo-admin gated). |
| routers/web/devtest/mock_actions.go | Provides mock queue data + logs reorder payload in devtest. |
| options/locale/locale_en-US.json | Adds new locale keys for “Queue” UI and related labels. |
| models/actions/task.go | Updates runner pickup scan to order by (queue_rank, updated, id) with keyset cursor. |
| models/actions/run_job.go | Adds QueueRank field to ActionRunJob. |
| models/actions/run_job_queue.go | Implements MoveQueuedJob and queue-rank assignment strategy. |
| models/actions/run_job_queue_test.go | Unit tests for MoveQueuedJob behavior and ordering invariants. |
| models/actions/run_job_list.go | Defines QueuedJobsOrderBy and adds queue-related filter options to queries. |
| models/actions/run_job_list_test.go | Tests queued-job filtering and ordering behavior. |
| modelmigration/v1_27/v343.go | DB migration adding queue_rank column/index. |
| modelmigration/migrations.go | Registers migration 343. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
@silverwind fixed |
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.
Adds a build queue view for Actions that answers "what runs next, and why is my
build waiting?" — and lets admins reorder the queue.
Two places surface it:
and running job across the whole instance.
Runs | Queue).Each view shows:
The list auto-refreshes in place.
Why
Until now there was no way to see the pending Actions queue. Runs are only visible
per-repository (newest-first), and nothing showed the order jobs get picked up or
what is currently running — nor any way to intervene when an important build is
stuck behind others.
What's new
admins on the instance queue). Reordering changes the real runner pickup order,
not just the display. It promotes a job in the queue; the job still only runs
once a runner with matching labels is free.
Scope / limitation
Ordering is globally exact only at the instance (admin) scope. The repository
queue is a filtered slice of the instance-wide queue, so it shows the correct
relative order of that repo's jobs but not their absolute position (org/user
runners pull across repositories).
Screenshots