Delete invalid vulnerability remediations
What does this MR do and why?
Cleans up invalid records for the issue detailed in #343576 (closed)
The original bug was deployed to Production on gitlab.com on August 2nd, 2021, so we will look at all vulnerability_findings_remediations
records created after August 1st, 2021. The fix has been deployed with !73581 (merged), but since we cannot be sure when a self-managed instance will have applied that version, I have not put an upper limit on the date range to search over.
On gitlab.com, there appears to have been ~3 million records created that we will need to check.
Migrate Up
bundle exec rake db:migrate:up VERSION=20211118194239
== 20211118194239 DropInvalidRemediations: migrating ==========================
-- Scheduled 1 DropInvalidRemediations jobs with a maximum of 3000 records per batch and an interval of 180 seconds.
The migration is expected to take at least 180 seconds. Expect all jobs to have completed after 2021-11-24 17:05:42 UTC."
== 20211118194239 DropInvalidRemediations: migrated (0.0508s) =================
Migrate Down
bundle exec rake db:migrate:down VERSION=20211118194239
== 20211118194239 DropInvalidRemediations: reverting ==========================
== 20211118194239 DropInvalidRemediations: reverted (0.0000s) =================
Total Duration
- Batch size:
3,000
(this was a pretty arbitrary number) - Delay:
3.minutes
- Total no. of rows to check: ~3,000,000
- Total no. of batches with delay of 3 mins: 3,000,000/3,000 = 1,000
- Total time for 1,000 batches: 1,000 * 3 = 3,000 mins = 50 hours
db:gitlabcom-database-testing output
!74951 (comment 743023608) - Updated as of December 1st, 2021.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #343576 (closed)