Skip to content

executors: Add site-admin dashboard

Warren Gifford requested to merge ef/cj/27446 into main

Created by: efritz

Fixes #27446 (closed). This PR adds a minimal dashboard to the site-admin UI that includes executor names, their (last reported) job counts, and the last time they were updated.

@eseliger has recently built out the other side of this effort in #27500. That PR sends additional telemetry data from the executor to the Sourcegraph instance so that we can track things like OS, versions, etc.

This PR does several things:

  • Creates a new executor_heartbeats table to store the last known heartbeat for unique executor instances
  • Adds a store in internal/database to access/modify this data
  • Writes to this store when heartbeat API calls are made in the executorqueue handler
  • Exposes a GraphQL API to surface this data
  • Adds a site-admin page with a filtered component over this data
  • A periodic routine that deletes very old inactive executor instance records

A bit of executorqueue needed to be refactored to get the queue name from the route. This affected a few files of setup in the worker process.

Merge request reports

Loading