Fix race condition issue on approval rules sync job
`Security::SyncReportsToApprovalRulesService` service class depends on the attribute of `head_pipeline` of merge requests to be set to sync security report results to approval rules. But the `head_pipeline` attribute of merge requests are set by Sidekiq job on background which can be finished before or after the logic of `Security::SyncReportsToApprovalRulesService`. For that reason, we have to move the scheduling of sync approval rule job after we set the `head_pipeline` of merge request.
Showing
Please register or sign in to comment