Display visualization validation errors on the dashboard
What does this MR do and why?
Frontend changes to integrate backend work Validate visualizations and provide errors via ... (!128247 - merged)
Backend now returns validation errors for any misconfigured visualizations. We display these validation errors in the relevant panel so customers know what needs fixing. Additionally, skip fetching data when we know the panel is in an invalid state, and do not provide the option to retry with the invalid configuration.
Also adds some extra margin between the error icon and the panel title, as they were running into each other.
Note that this feature is experimental / behind a default-off feature flag
Screenshots or screen recordings
How to set up and validate locally
- Follow these instructions to setup Product Analytics in GDK.
- Onboard a project at Project -> Analyze -> Analytics dashboards
- Modify a visualization to have invalid configuration
- An easy way to do this is to temporarily modify a built in visualization, e.g.
ee/lib/gitlab/analytics/product_analytics/visualizations/sessions_over_time.yaml
and add a new / unexpected property
- An easy way to do this is to temporarily modify a built in visualization, e.g.
- Verify the new error state is shown
- Panel is in "error" state
- Panel has a popover including a link to the troubleshooting docs, as well as the specific validation error returned from the backend
- Panel popover does not include the option to retry
- Verify existing error state works as expected
- An easy way to do this is to temporarily modify a built in visualization, e.g.
ee/lib/gitlab/analytics/product_analytics/visualizations/sessions_over_time.yaml
and modify themeasure
to an invalid value. Now the visualization will pass the validation check, but the request to CubeJS will fail - Panel should have the option to retry the failed request
- An easy way to do this is to temporarily modify a built in visualization, e.g.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #420685 (closed)