Replace find with find_by_id in SyncScanPoliciesWorker
What does this MR do and why?
This MR fixes a bug in Security::SyncScanPoliciesWorker
where ActiveRecord::RecordNotFound
exception was raised when configuration_id
was deleted. This results in unwanted retry by sidekiq and taking a toll on our error budget.
This MR uses find_by_id
as suggested in docs.
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.
Edited by Sashi Kumar Kumaresan