Skip to content

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.

Missing panel title field

Before After
Screenshot_2024-02-26_at_16.49.35 Screenshot_2024-02-26_at_15.07.33

Invalid / missing panel visualization field

Before After
Screenshot_2024-02-26_at_16.49.35 Screenshot_2024-02-26_at_16.23.45

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)
  1. Create a group or select an existing one
  2. 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>
  3. Navigate to Analyze > Analytics Dashboards in the left hand menu
  4. There will be 2 dashboards available in the dashboard list (Value Streams Dashboard + Your custom YAML dashboard)
  5. Select the custom dashboard
  6. An error message should appear
  7. 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>
  8. Navigate to Analyze > Analytics Dashboards in the left hand menu
  9. There will be 2 dashboards available in the dashboard list (Value Streams Dashboard + Your custom YAML dashboard)
  10. Select the custom dashboard
  11. An error message should appear

Related to #432587 (closed)

Edited by Ezekiel Kigbo

Merge request reports