Adds panels to show runner usage breakdown
What does this MR do and why?
This change adds a new panel in the group runners dashboard to shows the usage of compute minutes by runner and project.
Changes behind feature flag :runners_dashboard_for_groups
.
Is this a big MR?!
Well, a bit, most of the line changes come from changes in runner_usage_spec.js
as we add new describe
blocks and move code around.
Actually, the important changes here:
- Added props to
runner_usage.vue
, so they can pass parameters to queries, to fetch group metrics. - Added arguments to the corresponding GraphQL queries, to fetch group metrics.
- Update arguments in the a GraphQL mutation, so they match the queries.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
http://gdk.test:3000/groups/my-group/-/runners/dashboard
How to set up and validate locally
Activate the dashboard feature
- Enable the feature flag
:runners_dashboard_for_groups
. - Ensure you have an Ultimate license associated with your GDK
Setup ClickHouse data
-
Follow https://docs.gitlab.com/ee/development/database/clickhouse/clickhouse_within_gitlab.html#gdk-setup up to and including running migrations
-
Go to the shell in your GDK
gitlab
directory and runbundle exec rake "gitlab:seed:runner_fleet"
. This will seed your GDK with some runners and jobs required for testing this MR. -
Run the following in the rails console:
::Ci::Build.where.not(finished_at: nil).order(id: :desc).limit(5000).each{|build| ::Ci::FinishedBuildChSyncEvent.upsert({ build_id: build.id, build_finished_at: build.finished_at }, unique_by: [:build_id, :partition]) } ClickHouse::DataIngestion::CiFinishedBuildsSyncService.new.execute
Verify this change
- Visit the group's dashboard.
Related to #440207 (closed)