Expose YAML schema errors returned from Graphql
What does this MR do and why?
Expose YAML schema errors returned from Graphql
Updates the analytics dashboards error messages to include relevant graphql errors when the schema validation fails.
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.
title
field
Missing panel Before | After |
---|---|
visualization
field
Invalid / missing panel Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Setup
- Please make sure that you have a GitLab Ultimate license
- Enable the
group_analytics_dashboard_dynamic_vsd
feature flag$ Feature.enable(:group_analytics_dashboard_dynamic_vsd)
- Create a group or select an existing one
- Follow the instructions to add a YAML configuration for the group, but you will need to use this example below for your schema:
title: 'Custom Dashboard title' description: 'Custom description' panels: - title: 'My Custom Project' # broken panel - missing `visualization` gridAttributes: yPos: 1 xPos: 0 width: 12 height: 6 queryOverrides: namespace: <path-to-project>
- Navigate to
Analyze
>Analytics Dashboards
in the left hand menu - There will be 2 dashboards available in the dashboard list (Value Streams Dashboard + Your custom YAML dashboard)
- Select the custom dashboard
- An error message should appear
- Replace the dashboard configuration with this updated configuration
title: 'Custom Dashboard title' description: 'Custom description' panels: - visualization: dora_chart gridAttributes: yPos: 1 xPos: 0 width: 12 height: 6 queryOverrides: namespace: <path-to-project>
- Navigate to
Analyze
>Analytics Dashboards
in the left hand menu - There will be 2 dashboards available in the dashboard list (Value Streams Dashboard + Your custom YAML dashboard)
- Select the custom dashboard
- An error message should appear
Related to #432587 (closed)
Edited by Ezekiel Kigbo