Skip to content

Add "Active runners" to runner fleet dashboard

Miguel Rincon requested to merge 377324-add-dashboard-data into master

This change depends on !125032 (merged), !125034 (merged), !125301 (merged)

What does this MR do and why?

Implements: #377324 (closed)

Note: #377324 (closed) is just one step in the construction of our runner fleet dashboard, so it only contains one panel for now, so the layout is not very interesting yet.

Add runner performance dashboard page

This change adds the runner performance dashboard route as an empty page behind a new feature flag which acts as a placeholder for future development of a runner performance dashboard.

Screenshots or screen recordings

Loading Empty state With results
image image image

How to set up and validate locally

  1. In rails console (rails c) enable the feature

    Feature.enable(:runners_dashboard)
  2. Visit any the admin performance page http://gdk.test:3000/admin/runners/dashboard

    • No page links here yet, we will add that in later MRs.

Verify the empty state

  1. Verify the empty state, you will see it as long as you are not running jobs.

Verify with data

  1. We can seed data into our gdk, but the data seeded may not contain many running jobs, we can add this line to force more running jobs:
diff --git a/lib/gitlab/seeders/ci/runner/runner_fleet_pipeline_seeder.rb b/lib/gitlab/seeders/ci/runner/runner_fleet_pipeline_seeder.rb
index 2cd9afc5bdce..24aacfe01ecd 100644
--- a/lib/gitlab/seeders/ci/runner/runner_fleet_pipeline_seeder.rb
+++ b/lib/gitlab/seeders/ci/runner/runner_fleet_pipeline_seeder.rb
@@ -176,6 +176,7 @@ def create_build(pipeline, runner, job_status, index)
           end
 
           def random_pipeline_status
+            return 'running'
             if Random.rand(1..4) == 4
               %w[created pending canceled running].sample
             elsif Random.rand(1..3) == 1
  1. Run bundle exec rake "gitlab:seed:runner_fleet" to generate a mock running jobs.
  2. As an alternative, you can also run a few jobs in instance runners manually
  3. Refresh the page to see the list.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #377324 (closed)

Edited by Miguel Rincon

Merge request reports