Improve Group Security Dashboard performance
What does this MR do?
The Group Security Dashboards are timing out and they are timing out regardless of how many projects there are in the group. The problem is that the initial query is not leveraging the proper database indexes.
Examples: https://gitlab.com/groups/gitlab-org/-/security/dashboard, https://gitlab.com/groups/gitlab-org/security-products/-/security/dashboard/, and https://gitlab.com/groups/gitlab-org/defend/-/security/dashboard/
The only current workaround is to select projects from the projects dropdown in order to get results to come back.
This change supplies all the project ids on the initial dashboard to force the proper database indexes to be used. This is a temporary change that will go away when MVC Standalone Vulnerability objects (Vulnerability Management) is shipped.
Related Issue
Group Security Dashboard 'vulnerabilities' endpoint is timing out
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team