Skip to content

Admin API: list connected workers and queued demand - #2804

Merged
amankrx merged 5 commits into
TraceMachina:mainfrom
amankrx:pr/admin-listings
Sep 28, 2026
Merged

amankrx merged 5 commits into
TraceMachina:mainfrom
amankrx:pr/admin-listings

Conversation

@amankrx

@amankrx amankrx commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

What and why

The admin listener gains two read-only listings: the workers connected to this scheduler with their properties and running actions, and the queued demand with each action's properties and the client's last keepalive. The demand listing reads the queue the way the matcher does, so it sees what the matcher sees. This is what a provisioner should scale on instead of reading the scheduler's Redis directly.

How was this verified?

admin_test.rs: the demand listing returns queued actions highest priority first with their properties, queue time and the client's last keepalive; an action a worker is running leaves the demand and shows on that worker with the room it took; both listings round-trip through the JSON the endpoint serves. A fixed listing covers what happens between the filter and the read: a record that was dispatched, expired or cannot be decoded is left out and counted, and a store failure fails the listing; both fail without the change. On a test cluster the provisioner's counts from the admin API matched the matcher's queue depth metric while the Redis-derived counts drifted during evictions.

Risk

Low. New read-only endpoints on the admin listener, which is off unless configured. No config, wire or data changes elsewhere.

AI assistance

An agent drafted the change and I reviewed every line.


This change is Reviewable

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Sep 28, 2026 6:49pm UTC
nativelink-aidm Ready Ready Preview Sep 28, 2026 6:49pm UTC

Request Review

(cherry picked from commit 2dae64b02ffd7d029cd26fed6abe626a41e2980d)
(cherry picked from commit db786d898d7a9401e40ca90f1427a41e02411e37)
(cherry picked from commit 2af91b8a660b01d9ff7b1a50ab2d750fdd597ea4)
(cherry picked from commit b63338ef1bc526078ef96ce6cb79d777012cbb0c)
Comment thread nativelink-scheduler/src/admin.rs Resolved

@MarcusSorealheis MarcusSorealheis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you for this one also

@amankrx
amankrx merged commit 02a64f2 into TraceMachina:main Sep 28, 2026
46 checks passed

This branch was successfully deployed

2 active deployments
Preview – nativelink — 7af0ba9a Deployed Sep 28, 2026 by vercel[bot]
Preview – nativelink-aidm — 7af0ba9a Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants