Commit faecf33d authored by Thong Kuah's avatar Thong Kuah

Merge branch '321631-remove-ci_fix_commit_status_retried' into 'master'

Remove the FF ci_fix_commit_status_retried

See merge request gitlab-org/gitlab!69555
parents 2ec82857 fed8e557
......@@ -21,14 +21,14 @@ module Ci
Ci::Pipeline.transaction do
yield(job)
job.update_older_statuses_retried! if Feature.enabled?(:ci_fix_commit_status_retried, pipeline.project, default_enabled: :yaml)
job.update_older_statuses_retried!
end
end
else
Ci::Pipeline.transaction do
yield(job)
job.update_older_statuses_retried! if Feature.enabled?(:ci_fix_commit_status_retried, pipeline.project, default_enabled: :yaml)
job.update_older_statuses_retried!
end
end
......
---
name: ci_fix_commit_status_retried
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54300
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/321631
milestone: '13.9'
type: development
group: group::pipeline authoring
default_enabled: true
......@@ -345,38 +345,12 @@ RSpec.describe API::CommitStatuses do
expect(json_response['status']).to eq('success')
end
context 'feature flags' do
using RSpec::Parameterized::TableSyntax
where(:ci_fix_commit_status_retried, :ci_remove_update_retried_from_process_pipeline, :previous_statuses_retried) do
true | true | true
true | false | true
false | true | false
false | false | true
end
with_them do
before do
stub_feature_flags(
ci_fix_commit_status_retried: ci_fix_commit_status_retried,
ci_remove_update_retried_from_process_pipeline: ci_remove_update_retried_from_process_pipeline
)
end
it 'retries a commit status', :sidekiq_might_not_need_inline do
it 'retries the commit status', :sidekiq_might_not_need_inline do
post_request
expect(CommitStatus.count).to eq 2
if previous_statuses_retried
expect(CommitStatus.first).to be_retried
expect(CommitStatus.last.pipeline).to be_success
else
expect(CommitStatus.first).not_to be_retried
expect(CommitStatus.last.pipeline).to be_failed
end
end
end
end
end
......
......@@ -59,18 +59,6 @@ RSpec.describe Ci::Pipelines::AddJobService do
end
end
context 'when the FF ci_fix_commit_status_retried is disabled' do
before do
stub_feature_flags(ci_fix_commit_status_retried: false)
end
it 'does not call update_older_statuses_retried!' do
expect(job).not_to receive(:update_older_statuses_retried!)
execute
end
end
context 'exclusive lock' do
let(:lock_uuid) { 'test' }
let(:lock_key) { "ci:pipelines:#{pipeline.id}:add-job" }
......
......@@ -295,18 +295,6 @@ RSpec.describe Projects::UpdatePagesService do
expect(older_deploy_job.reload).to be_retried
end
context 'when FF ci_fix_commit_status_retried is disabled' do
before do
stub_feature_flags(ci_fix_commit_status_retried: false)
end
it 'does not mark older pages:deploy jobs retried' do
expect(execute).to eq(:success)
expect(older_deploy_job.reload).not_to be_retried
end
end
end
private
......
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