Commit e8c20867 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'remove-erase_traces_from_already_archived_jobs_when_archiving_again' into 'master'

Remove by default enabled feature flag

See merge request gitlab-org/gitlab!65151
parents 48c6fb11 41863bad
---
name: erase_traces_from_already_archived_jobs_when_archiving_again
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56353
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326679
milestone: "13.11"
type: development
group: group::pipeline execution
default_enabled: true
...@@ -189,7 +189,7 @@ module Gitlab ...@@ -189,7 +189,7 @@ module Gitlab
raise ArchiveError, 'Job is not finished yet' unless job.complete? raise ArchiveError, 'Job is not finished yet' unless job.complete?
if trace_artifact if trace_artifact
unsafe_trace_cleanup! if Feature.enabled?(:erase_traces_from_already_archived_jobs_when_archiving_again, job.project, default_enabled: :yaml) unsafe_trace_cleanup!
raise AlreadyArchivedError, 'Could not archive again' raise AlreadyArchivedError, 'Could not archive again'
end end
......
...@@ -30,11 +30,6 @@ RSpec.describe Ci::ArchiveTraceService, '#execute' do ...@@ -30,11 +30,6 @@ RSpec.describe Ci::ArchiveTraceService, '#execute' do
create(:ci_build_trace_chunk, build: job) create(:ci_build_trace_chunk, build: job)
end end
context 'when the feature flag `erase_traces_from_already_archived_jobs_when_archiving_again` is enabled' do
before do
stub_feature_flags(erase_traces_from_already_archived_jobs_when_archiving_again: true)
end
it 'removes the trace chunks' do it 'removes the trace chunks' do
expect { subject }.to change { job.trace_chunks.count }.to(0) expect { subject }.to change { job.trace_chunks.count }.to(0)
end end
...@@ -49,27 +44,6 @@ RSpec.describe Ci::ArchiveTraceService, '#execute' do ...@@ -49,27 +44,6 @@ RSpec.describe Ci::ArchiveTraceService, '#execute' do
end end
end end
end end
context 'when the feature flag `erase_traces_from_already_archived_jobs_when_archiving_again` is disabled' do
before do
stub_feature_flags(erase_traces_from_already_archived_jobs_when_archiving_again: false)
end
it 'does not remove the trace chunks' do
expect { subject }.not_to change { job.trace_chunks.count }
end
context 'when associated data does not exist' do
before do
job.job_artifacts_trace.file.remove!
end
it 'does not remove the trace artifact' do
expect { subject }.not_to change { job.reload.job_artifacts_trace }
end
end
end
end
end end
context 'when job does not have trace' do context 'when job does not have trace' 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