Fix race condition while creating scan_result_policy_read
What does this MR do and why?
Similar to Handle race condition in approval rule creation... (!190155 - merged), while rolling out use_approval_policy_rules_for_approval_rules FF, there was a race-condition with creating scan_result_policy_reads when there are concurrent execution of workers. This MR adds an additional check before creating scan_result_policy_reads.
This MR also adds logs when ApprovalRules::CreateService & ApprovalRules::UpdateService fails as we are currently not doing error-handling.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
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.
Addresses #538759 (closed)
Edited by Sashi Kumar Kumaresan