Improve Analytics dashboards schema errors
What does this MR do and why?
Replaces the vague GraphQL error messages returned when an Analytics dashboard configuration is invalid with friendlier error messages from the new errors
field in the CustomizableDashboard
GraphQL object type to display in the UI when they are present. In order to bypass the default GraphQL error handling to display these schema errors, this MR allows any fields coming from the YAML config – specifically from ProductAnalytics::Dashboard
and ProductAnalytics::PanelType
– to be nullable.
This MR also does the following:
- Adds a
Contains errors
badge to any invalid dashboards listed in the Analytics dashboards page. Previously, no errors were displayed. - Updates all built-in dashboard configurations – Value Streams Dashboard, Behavior, Audience, AI Impact – to ensure that they match the dashboard JSON schema defined in
ee/app/validators/json_schemas/analytics_dashboard.json
.
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.
View | Before | After |
---|---|---|
Dashboards List | ||
Dashboard |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Please make sure that you have a GitLab Ultimate license.
-
Create a group or select an existing one
-
Follow the instructions to add a YAML configuration for the group and use the example below for your schema:
title: 'Custom Dashboard - Test VSD' description: 'Custom description' panels: - visualization: dora_chart # broken panel - missing `title` and `gridAttributes` queryOverrides: {}
-
Navigate to
Analyze
>Analytics Dashboards
in the left hand menu -
Verify that a
Contains errors
badge should appear next toCustom Dashboard - Test VSD
-
Select
Custom Dashboard - Test VSD
-
Verify that an alert appears listing all of the dashboard schema's errors with a link to the troubleshooting section in the Analytics dashboards doc
Related to #444915