Skip to content

feat(gpu): link GPU hosts to Buildkite queues and running jobs - #132

Merged
khluu merged 2 commits into
mainfrom
task/gpu-host-job-links
Sep 4, 2026
Merged

khluu merged 2 commits into
mainfrom
task/gpu-host-job-links

Conversation

@khluu

@khluu khluu commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

What

/gpu shows hosts like dgxb200-01 at high memory/utilization with no way to see which queue the host serves or which job is running on it. This wires GPU hosts to their Buildkite agents:

  • Sampling: the 5-minute poll-metrics cron now also fetches connected agents from the Buildkite GraphQL API and persists one row per agent (hostname, queue= meta-data tags, current job id/label/build number/url) into a new buildkite_agent_snapshots table, with 30-day retention matching queue_snapshots.
  • Migration: migrations/sql/0020_buildkite_agent_snapshots.sql. Like other dashboard tables it is intentionally left out of the RLS lockdown in 0009.
  • API: new GET /api/gpu/agents joins recent GPU hosts to the latest agent sample per agent. Hostnames are normalized (lowercased, domain suffix stripped; IPv4 addresses kept whole) — GPU reporters send short names while Buildkite may record FQDNs or different casing. Hosts with no matching agent are returned with null agent fields so the mismatch is visible rather than silently dropped; when several agents share a normalized hostname, one running a job wins.
  • UI: the /gpu Host Summary renders queue · job name as plain text with a Buildkite link under the host name. No styling changes beyond reusing existing classes.

Verification

  • npm run lint — clean
  • npm test — 66/66 pass, including new unit tests for normalizeHostname, queueTagsFromMetaData, and joinGpuHostsToAgents in src/lib/buildkite-agent-query.test.ts
  • npx tsc --noEmit — clean
  • migrations: uv run pytest (25/25), ruff check, mypy — clean

Not verified: the GraphQL agents query against the live Buildkite API (needs BUILDKITE_API_TOKEN); the response mapping is defensive (all fields optional, invalid payloads raise a clear 502).

Deployment note

Apply migration 0020 before deploying, per the migrations module conventions:

DATABASE_URL=postgres://... uv run vllm-dashboard-migrate          # read-only plan
DATABASE_URL=postgres://... uv run vllm-dashboard-migrate   --apply --confirm-target db.example.supabase.co:5432/postgres

Agent rows only start accumulating on the first poll-metrics run after deploy, so queue/job links appear within ~5 minutes.

Sample connected Buildkite agents in the 5-minute poll-metrics cron and
persist hostname, queue tags, and the current job to a new
buildkite_agent_snapshots table (migration 0018). A new GET /api/gpu/agents
endpoint joins GPU hosts to agents by normalized hostname (lowercased,
domain suffix stripped), and the /gpu Host Summary renders the queue and
current job with a Buildkite link under each host name.
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
vllm-ci-dashboard Ready Ready Preview Sep 4, 2026 2:07am UTC

Request Review

Resolve conflicts with the GPU host-health restructure (#135):
- gpu-dashboard.tsx: keep upstream's GpuHostTable/buildHostRows and pass
  the /api/gpu/agents map through as an optional prop instead of the old
  inline Host Summary table.
- gpu-host-table.tsx: optional agents prop renders 'queue . job' with a
  Buildkite link under the host name.
- poll-metrics: keep agent sampling; move buildkite_agent_snapshots
  retention into the dedicated /api/cron/retention task per upstream's
  decoupling of raw-snapshot cleanup.
- Renumber the agent-snapshots migration to 0020 (upstream took 0018 and
  0019).
@khluu
khluu merged commit e9ae9b9 into main Sep 4, 2026
2 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — d6fa0d20 Deployed Sep 4, 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.

1 participant