Consolidate scan readiness logic

What does this MR do and why?

Consolidate scan readiness logic

We have several different implementations for when all scans are ready and all of them are wrong. Scan results are ready as soon as all security jobs are complete in the current pipeline as well as its children. This change takes the implementation from Pipeline#all_security_jobs_complete?, updates it to include child pipelines, and uses it for all places where we check scan status.

For CompareSecurityReportsService, we also need to check the Security::Scan status to make sure that the async sidekiq processes that ingest scan results are done.

References

Relates to: #585505

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.

Edited by Brian Williams

Merge request reports

Loading