Add GraphQL mutation to refresh standards adherence checks
What does this MR do and why?
This API triggers the ComplianceManagement::Standards::RefreshService
which refreshes the standards adherence checks for all the projects
within that group.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Ensure you have ultimate license on your GDK.
- Visit the standards adherence dashboard. Eg:
https://gdk.test:3000/groups/twitter/-/security/compliance_dashboard/standards_adherence
- Delete all the adherence records for all the projects within this group by running the following in rails console
group = Group.find(<id_of_your_group>)
Projects::ComplianceStandards::Adherence.for_group_and_its_subgroups(group).each(&:destroy)
- Visit the standards adherence dashboard again for that group and ensure that it is empty.
- Visit the GraphiQL explorer. Eg:
https://gdk.test:3000/-/graphql-explorer
- Run the following mutation
mutation runStandardsAdherenceChecks {
refreshStandardsAdherenceChecks(input: {groupPath: "twitter"}) {
adherenceChecksStatus {
startedAt,
totalChecks,
checksCompleted
}
}
}
- Visit the standards adherence dashboard again for that group and ensure that it has all the records again.
Closes #434199 (closed)