[go: up one dir, main page]

Skip to content

Requeue BackfillArchivedAndTraversalIdsToVulnerabilityStatistics

Why are we doing this work

Depending on the outcome of Change Vulnerabilities Statistics services to s... (#517107 - closed), we might have to requeue BackfillArchivedAndTraversalIdsToVulnerabilityStatistics to ensure that all vulnerability_statistics records have their traversal_ids and archived columns correctly set.

This backfill BBM was originally introduced as part of Backfill vulnerability_statistics.traversal_ids... (#513030 - closed).

Relevant links

See #517112 (comment 2330456361)

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

Create a post DB migration that re-enqueue BackfillArchivedAndTraversalIdsToVulnerabilityStatistics.

Verification steps

There should be no vulnerability_statistics such as traversal_ids is an empty array.

On postgres.ai the following queries should return no record at all.

explain select 1 from vulnerability_statistics
where traversal_ids = '{}'::bigint[]
and latest_pipeline_id is null;
explain select 1 from vulnerability_statistics
where traversal_ids = '{}'::bigint[]
and latest_pipeline_id is not null;

/cc @ghavenga

Edited by Fabien Catteau