Update compliance report local resolver to match new format
What does this MR do and why?
This MR is part of a series of changes to update the compliance report to consume the newly added GraphQL endpoint #342897 (closed):
- Update compliance report local resolver to match new format.
👈 You are here. - Update the compliance report to use the new GraphQL endpoint. !82397 (merged)
Changes made to the format:
-
severity
is nowseverityLevel
-
severityLevel
andreason
will return the enum text not the enum int e.g.CRITICAL
rather than4
-
mergedBy
is nowmergeUser
-
reference
is nowref
-
project
has been moved tomergeRequest.project
-
createdBefore/createdAfter
are nowmergedBefore/mergedAfter
: https://docs.gitlab.com/ee/api/graphql/reference/#complianceviolationinput -
SEVERITY_ASC/DESC
is nowSEVERITY_LEVEL_ASC/DESC
: https://docs.gitlab.com/ee/api/graphql/reference/#complianceviolationsort
This feature is behind a development feature flag.
Screenshots or screen recordings
No visual change.
Screen_Recording_2022-03-08_at_14.23.58
How to set up and validate locally
- You need a GitLab Ultimate license.
- Enable the new feature flag in your terminal:
echo "Feature.enable(:compliance_violations_report)" | rails c
- View the compliance report and verify that the filter syncs with the URL query:
[GDK_HOST]/groups/gitlab-org/-/security/compliance_dashboard
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 #342897 (closed)
Edited by Jiaan Louw