Migrations cleanup related to raw_metadata
Extracted from this comment
Do we already have an issue to add the cleanup migration in the next milestone? I think it's not required to create one right away but it's helpful to keep track of the status.
Implementation Plan
-
Use Gitlab::BackgroundMigration.steal to process any remaining jobs in Sidekiq. -
Reschedule the migration to be run directly (that is, not through Sidekiq) on any rows that weren’t migrated by Sidekiq. This can happen if, for instance, Sidekiq received a SIGKILL, or if a particular batch failed enough times to be marked as dead. -
Remove Gitlab::Database::BackgroundMigrationJob rows where status = succeeded. To retain diagnostic information that may help with future bug tracking you can skip this step by specifying the delete_tracking_jobs: false parameter.
Verification Steps
- Look for errors related to
MigrateEvidencesForVulnerabilityFindings
,MigrateLinksForVulnerabilityFindings
andMigrateRemediationsForVulnerabilityFindings
.
Edited by Zamir Martins