Refactor IngestReportsService with execute strategy
What does this MR do and why?
Refactor IngestReportsService to implement the execute strategy, avoiding the deletion task and other unnecessary operations, and establish separation of concerns.
Key Updates:
- ExecutionStrategy: The execution logic is now handled by a dedicated ExecutionStrategy class. The default behavior is encapsulated in ExecutionStrategy::Default, while ExecutionStrategy::ContainerScanning overrides the necessary parts.
- Strategy Selection: The IngestReportsService class uses strategy_class to determine which strategy to apply, making it easy to customize the behavior in subclasses.
- Minimal Duplication: By isolating the execution logic in strategy classes, we avoid duplication and maintain a clear separation of concerns.
This setup allows for clean and maintainable code, with specific execution logic for different scenarios.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Execute a CS job and verify the last updated time on the dependency list and vulnerability report pages of the SBOM pipeline.
- Run another CS job with
REGISTRY_TRIGGERED: true
. After successful completion, the pipeline timestamp and link should remain unchanged, as they previously did.
Related to #478466 (closed)
Edited by Aditya Tiwari