Skip to content

Optimize updates of sbom_occurrences

Fabien Catteau requested to merge 442486-optimize-sbom_occurrences_upserts into master

What does this MR do and why?

Change the comparison performed in IngestOccurrences#attibutes so that the pipeline_id and commit_sha are ignored. This way sbom_occurrences records aren't touched when the same SBOM components is ingested from a new pipeline and a new commit. See https://gitlab.com/gitlab-org/gitlab/-/issues/442486

The change is behind a feature flag named skip_sbom_occurrences_update_on_pipeline_id_change. The flag is disabled by default.

This results in a minor behavior change that is documented in user docs for the Dependency List.

Prior to this change, the behavior was neither documented nor tested.

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #442486

Edited by Fabien Catteau

Merge request reports