Skip to content

400 Error on Value Stream Analytics page

Description

There is currently a 400 error being thrown on the Value Stream Analytics page after fetching data.

The network tab shows the following request failing;

https://gitlab.com/-/analytics/type_of_work/tasks_by_type?group_id=gitlab-org&created_after=2019-11-05&created_before=2019-12-05&subject=Issue&label_ids[]=10438591&label_ids[]=12701315&label_ids[]=8745578&label_ids[]=3063810 (truncating the label_ids as there are hundreds)

The frontend error being thrown is There was an error fetching data for the chart.

I am unable to replicate this locally.

Update

The tasks by type includes filters by label, currently we use Group labels to achieve this. The gitlab-org group has hundreds of labels which is causing the request for data to fail.

Local testing

  1. Enable the :tasks_by_type_chart feature flag
  2. Navigate to Analytics > Cycle analytics
  3. Select the gitlab-org group

You might need to seed / manually create additional labels

Screenshots

Frontend error Request error
Screenshot_2019-12-05_at_16.11.10 Screenshot_2019-12-05_at_16.16.22

Solution

  • We will add a BE endpoint returning the top N labels
  • We will update the FE to:
    • allow maximum of 15 labels to be selected
    • preselect the first top 10 labels on page load
Edited by Dennis Tang