Skip to content

Display runner dashboard ClickHouse features

Miguel Rincon requested to merge 428166-add-fleet-health-metrics-panel into master

What does this MR do and why?

This fix ensures the right elements are shown when ClickHouse is configured for the runners dashboard as well as making the dashboard layout when they are not.

When Clickhouse analytics is enabled, the following dashboard elements become available:

  • Runner Usage CSV export
  • Wait time to pick a job history chart

Changelog: fixed

Implementation Notes

  1. I replaced the CSS dashboard grid with a flex implementation, so when the CSV export panel is hidden, the rest of the content flows.
  2. I removed an outdated reference to the clickhouse_ci_analytics feature flag that has been removed in %16.8 in favor of the a check for ClickHouse to be configured
  3. Renamed components RunnerDashboardStatus... to RunnerDashboardStat... to match GlSingleStat nomenclature.

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

::Gitlab::ClickHouse.configured? == true ::Gitlab::ClickHouse.configured? == false
image image

How to set up and validate locally

We can test two states of the dashboard, with ClickHouse enabled and disabled

Disable Clickhouse

By default, your instance may not have Clickhouse configured.

  1. Ensure you don't have a file at config/click_house.yml.

  2. You may restart if needed

Enable Clickhouse

  1. Locally, create a file called config/click_house.yml, with the following contents:
test:
  main:
    database: gitlab_clickhouse_test
    url: 'http://localhost:8123'
    username: default
development:
  main:
    database: gitlab_clickhouse_development
    url: 'http://localhost:8123'
    username: default

This will tell your instance to look for a clickhouse database at http://localhost:8123. Even if you don't have one, the dashboard will show in the desired state (with an error at the top).

  1. Restart your instance (e.g. gdk restart)

Related to #428166 (closed)

Edited by Miguel Rincon

Merge request reports