Backfill vulnerability_statistics.traversal_ids, archived
Why are we doing this work
As part of #512592 (closed)
we're adding two new columns to the vulnerability_statistics table: traversal_ids and archived.
These columns need to be backfilled using the projects and namespaces tables.
The backfill is implemented in a Batched Background Migration (BBM).
The backfill BBM should only start after the code has been changed to keep traversal_ids and archived in sync
with the projects and namespaces table, and so this issue depends on
Keep vulnerability_statistics.traversal_ids in ... (#513028 - closed)
and Keep vulnerability_statistics.archived in sync (#513029 - closed).
Relevant links
Non-functional requirements
DocumentationFeature flag-
Performance: migration has to be fast enough -
Testing: migration has specs
Implementation plan
Add batched background migration (BBM) to backfill vulnerability_statistics.traversal_ids and archived columns, specs, and post-migration to enqueue that BBM.
Verification steps
Can be tested in the context of the group security dashboard of specific groups where remove_cross_join_from_vulnerabilities_projects_grade is enabled.
See ProjectsGrades.grades_for using vulnerability_s... (!177892 - merged) and
Resolve cross-join in ProjectsGrades.grades_for... (#513472 - closed).