Commit 9aabd518 authored by Igor Drozdov's avatar Igor Drozdov

Remove remove_import_data_on_failure feature flag

Changelog: removed
parent b0a4f182
...@@ -58,10 +58,8 @@ class ProjectImportState < ApplicationRecord ...@@ -58,10 +58,8 @@ class ProjectImportState < ApplicationRecord
end end
after_transition any => :failed do |state, _| after_transition any => :failed do |state, _|
if Feature.enabled?(:remove_import_data_on_failure, state.project, default_enabled: :yaml)
state.project.remove_import_data state.project.remove_import_data
end end
end
after_transition started: :finished do |state, _| after_transition started: :finished do |state, _|
project = state.project project = state.project
......
---
name: remove_import_data_on_failure
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80074
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/352156
milestone: '14.8'
type: development
group: group::source code
default_enabled: true
...@@ -89,19 +89,6 @@ RSpec.describe ProjectImportState, type: :model do ...@@ -89,19 +89,6 @@ RSpec.describe ProjectImportState, type: :model do
import_state.mark_as_failed(error_message) import_state.mark_as_failed(error_message)
end.to change { project.reload.import_data }.from(import_data).to(nil) end.to change { project.reload.import_data }.from(import_data).to(nil)
end end
context 'when remove_import_data_on_failure feature flag is disabled' do
it 'removes project import data' do
stub_feature_flags(remove_import_data_on_failure: false)
project = create(:project, import_data: ProjectImportData.new(data: { 'test' => 'some data' }))
import_state = create(:import_state, :started, project: project)
expect do
import_state.mark_as_failed(error_message)
end.not_to change { project.reload.import_data }
end
end
end end
describe '#human_status_name' do describe '#human_status_name' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment