Use default page size for vulnerability report on page load
What does this MR do and why?
In this previous MR Enable vulnerability_report_pagination feature ... (!84553 - merged), we allowed users to fetch their user-selected size from local storage instead of the default page size (DEFAULT_PAGE_SIZE = 20
). However, if the user-selected size is large (ie. pageSize = 50
or pageSize = 100
), this increases the complexity score, and we will get this error:
Query has complexity of 257, which exceeds the maximum of 250
In this discussion, I discussed a few solutions > #372151 (comment 1082871890). Decreasing the default page size is the easiest way to decrease the complexity. So in this MR, I removed the user-selected size ability and instead on page load, the vulnerability list will return the default page size. (Note: the users can still select a different page size. It's just on page load, their user-selected size will not be remembered in local storage).
This is just an iterative solution. Once we address the underlying performance issue in a follow-up MR, we will return the use of <local-storage-sync>
that allows user to load their previously set page size on page load.
Screenshots or screen recordings
display_default_page_size_only
How to set up and validate locally
- Go to a project vulnerability report page
- Scroll down and notice it will
Show 20 items
- Select
Show 50 items
and refresh the page - The report page will display
Show 20 items
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 #372151 (closed)