Skip to content

Gracefully handle invalid notes in legacy upload migration

Stan Hu requested to merge sh-fix-legacy-upload-migration into master

If the database contains notes with invalid noteable values, the background migration would fail repeatedly, causing duplicate "failed to migrate" text to appear in LegacyDiffNotes. To avoid this, we now bypass validations when updating the note text. For LegacyDiffNotes, we also make the job idempotent so that the duplicate failed migration errors cannot be added repeatedly.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62982

Edited by Stan Hu

Merge request reports