VSA: Group API URL malformed when filtering users

Summary

When filtering by assignee or author, the filter bar raises an error and the underlying request has returned 404.

Steps to reproduce

  1. Open the inspector in browser
  2. Go to a group's VSA dashboard
  3. Use the filter bar to search by assignee
  4. See the flash notice

image

Turns out the query is malformed 🙀

https://gitlab.com/api/v4/groups/groups%2Fgitlab-org/members?per_page=20&query=

where it should be

https://gitlab.com/api/v4/groups/gitlab-org/members?per_page=20&query=

image

Example Project

See https://gitlab.com/groups/gitlab-org/-/analytics/value_stream_analytics?created_after=2022-11-01&created_before=2022-12-27&value_stream_id=779&project_ids[]=278964&label_name[]=group%3A%3Aoptimize

What is the current bug behavior?

Filter does not return any members, renders a flash error instead.

What is the expected correct behavior?

Filter should filter normally.

Output of checks

This bug happens on GitLab.com

Log: https://log.gprd.gitlab.net/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-2d,to:now))&_a=(columns:!(),filters:!(),index:'7092c4e2-4eb5-46f2-8305-a7da2edad090',interval:auto,query:(language:kuery,query:'json.username:%20cablett%20and%20json.status:%20404%20and%20json.path:%20%09%0A%22%2Fapi%2Fv4%2Fgroups%2Fgroups%252Fgitlab-org%2Fmembers%22'),sort:!(!(json.time,desc)))

This query searches for my username but the important bit is the path being malformed (has an HTML entity in it).

Possible fixes

This change 56b23687 may have affected it: ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js#L18

Workaround is to add author/assignee filter to URL, but this is a bit opaque potentially and not a great workaround 🤔

Edited by charlie ablett