14.2 Migration BackfillDraftStatusOnMergeRequests does not always mark itself as complete
Test added in !83164 (diffs) demonstrates that this migration does not mark itself as complete after execution when the instance lacks records that match the migration's target.
Jobs spawned during its execution will permanently remain in pending
state.
Steps to reproduce
- Install a new GitLab 14.1 EE omnibus instance
- Create a project and create at least one merge request under it
- Upgrade it to 14.2 to invoke the background migration: !67687 (merged)
- Check pending background migrations count: https://docs.gitlab.com/ee/update/#checking-for-background-migrations-before-upgrading
- Expectation: Count is non-zero
- Observation: Count is 1+
Edited by Harsh Chouraria