Deleting all compliance statuses for a project when transferred

What does this MR do and why?

This MR deletes all the associated compliance statuses for a project when the project gets transferred to another namespace, even if the namespace belongs to the same top-level namespace. This is being done to ensure that the compliance statuses for the project gets marked with correct namespace and to avoid inconsistencies.

The compliance statuses will be regenerated by the compliance evaluation cron for the project in the next 12 hours.

References

How to set up and validate locally

  1. You need to have a group with Ultimate license.
  2. For speeding things up, change the value of PROJECT_EVALUATOR_WORKER_DELAY to 1.second.
  3. You need to have at least 1 project, a subgroup and a compliance framework(it should have atleast 1 requirement and a control) in the group.
  4. Wait for a minute and then refresh the compliance status dashboard for the group, it should have entries for the project compliance statuses.
  5. Now, transfer the project to the subgroup of same group.
  6. Go to the compliance status dashboard again and refresh it. All the entries for that project must be removed.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #514360 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports

Loading