Skip to content

Fixed contributor count metric in VSD comparison table

Rudy Crespo requested to merge rcrespo3-fix-contributor-count-query into master

What does this MR do and why?

In !145091 (merged), the util that extracts responses from the VSD metrics' queries was changed to no longer expect the namespace key. However, the namespace alias was not removed from the contributor count metric's GraphQL query, preventing any values from appearing in the comparison table. This MR fixes that by removing said alias.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot 2024-02-23 at 10.49.48 AM.png Screenshot 2024-02-23 at 10.36.49 AM.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Enable these feature flags:

# enable Clickhouse
Feature.enable(:clickhouse_data_collection)
Feature.enable(:event_sync_worker_for_click_house)

# enable group dashboards and dynamic group VSD
Feature.enable(:group_analytics_dashboards)
Feature.enable(:group_analytics_dashboard_dynamic_vsd)
  1. Please make sure that you have a GitLab Ultimate license.
  2. Ensure that Clickhouse is configured: https://docs.gitlab.com/ee/development/database/clickhouse/clickhouse_within_gitlab.html
    • For prepping the DB schema you can invoke: bundle exec rake gitlab:clickhouse:migrate
  3. FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 bundle exec rake db:seed_fu
  4. Visit the group from the output above, get its ID and run the following seeder: GROUP_ID={GROUP_ID} SEED_VSD_COUNTS=1 FILTER=vsd_overview_counts bundle exec rake db:seed_fu
  5. In your rails console, enter the following: ClickHouse::EventsSyncWorker.new.perform
  6. Visit your group's VSD and verify values for the Contributor count metric appear in the comparison panel: http://gdk.test:3443/groups/{GROUP_PATH}/-/analytics/dashboards/value_streams_dashboard
Edited by Rudy Crespo

Merge request reports