Migration lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb 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 its related feature flag is turned off.
Jobs spawned during its execution will permanently remain in pending state.
Implementation plan
- Add snippet below to https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb:431 and spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb:457
- Make sure it passes
it_behaves_like 'marks background migration job records' do
let(:arguments) { [1, 4] }
subject { described_class.new }
end
Edited by Michał Zając