Allow use to select a date range of Runner Usage
What does this MR do and why?
This improvement allows users of the runner fleet dashboard to select a date range to fetch information on the runner usage.
It also allows users to export a CSV with the usage with the selected date range.
Changelog: changed
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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
| Before | After |
|---|---|
|
|
|
|
See this change in context:
|
How to set up and validate locally
The runner fleet dashboard is build to aggregate large amounts of data so it is powered by ClickHouse and provided to GitLab Ultimate users.
- Make sure your GDK has ClickHouse set up and your are running GitLab Ultimate.
Note! Ensure you ClickHouse schema is up to date:
bundle exec rake gitlab:clickhouse:migrate
-
If you have run a few jobs in your GDK, you can skip this step, but your results may be simple. If you want to see more realistic production-like data, running
bin/rake "gitlab:seed:runner_fleet"will seed many jobs and runners (more about this command) -
Sync the ClickHouse data from your jobs in
rails c
::Ci::Build.where.not(finished_at: nil).find_each{|build| ::Ci::FinishedBuildChSyncEvent.upsert({ project_id: build.project_id, build_id: build.id, build_finished_at: build.finished_at }, unique_by: [:build_id, :partition]) }
ClickHouse::DataIngestion::CiFinishedBuildsSyncService.new.execute
- Visit the admin Runner Fleet dashboard
http://gdk.test:3000/admin/runners/dashboard
Related to #438418 (closed)




