Skip to content

Fix and finalise BackfillDismissalReasonInVulnerabilityReads

What does this MR do and why?

The BackfillDismissalReasonInVulnerabilityReads background migration had an issue in which invalid Vulnerability records which did not have their dismissed_at value appropriately filled in when :dismissed but lacking a correlating State Transition record to fill this data in form, would result in an attempt to create a StateTransition record with a nil created_at.

This MR updates the migration to ensure that the vulnerability has the :dismissed_value appropriately set before attempting to create the State Transition record.

It additionally re-implements the finalisation of the background migration from !137999 (diffs) which was reverted in !138964 (diffs) due to this problem.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #433505 (closed)

Edited by Gregory Havenga

Merge request reports

Loading