Skip to content

Add filter_labels option to the VSD configuration file

Alex Pennells requested to merge 388890-filter-by-label into master

What does this MR do and why?

Add filter_labels option to the VSD configuration file, which restricts the metrics shown in the comparison chart based on the label queries provided. If multiple labels are provided, only a single label needs to match for the data to be included in the results.

Not all existing VSD metrics are compatible. Incompatible metrics will be excluded from the rendered table by default. List of compatible metrics:

  • lead_time
  • cycle_time
  • issues
  • issues_completed
  • merge_request_throughput

filter_labels is dependant on the vsd_graphql_dora_and_flow_metrics feature being enabled. This feature flag is scheduled to be removed in %16.3 (link)

Screenshots or screen recordings

<3 Labels
Screenshot_2023-06-27_at_1.16.40_PM
3+ Labels
Screenshot_2023-07-11_at_11.20.32_PM
No matches (or error thrown)
Screenshot_2023-06-27_at_1.17.24_PM

How to set up and validate locally

  1. Feature.enable(:combined_analytics_dashboards)
  2. Feature.enable(:vsd_graphql_dora_and_flow_metrics)
  3. Setup YAML configuration
  4. Seed analytics data (and optionally DORA metrics data)
  5. Visit the value streams dashboard: http://gdk.test:3000/groups/${YOUR_GROUP}/-/analytics/dashboards
  6. Apply some label filters to your YAML config file
  7. Validate that the VSD is showing the expected labels on page load
  8. Create and close an issue with a test label
  9. Validate that a VSD with the test label filter applied updates based on the created/closed issue

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 #388890 (closed)

Edited by Alex Pennells

Merge request reports

Loading