Commit 66360678 authored by Stan Hu's avatar Stan Hu

Remove prevent_retry_of_retried_jobs feature flag

This feature flag prevents already-retried builds from being retried
again. This feature flag:

* shipped in GitLab 14.0:
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62349

* enabled by defualt in GitLab 14.0:
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63112

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/331695

Changelog: changed
parent ccaf08c9
......@@ -466,13 +466,9 @@ module Ci
end
def retryable?
if Feature.enabled?(:prevent_retry_of_retried_jobs, project, default_enabled: :yaml)
return false if retried? || archived?
return false if retried? || archived?
success? || failed? || canceled?
else
!archived? && (success? || failed? || canceled?)
end
success? || failed? || canceled?
end
def retries_count
......
---
name: prevent_retry_of_retried_jobs
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62349
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/331695
milestone: '14.0'
type: development
group: group::pipeline execution
default_enabled: true
......@@ -1955,17 +1955,7 @@ RSpec.describe Ci::Build do
described_class.retry(build, user)
end
context 'when prevent_retry_of_retried_jobs feature flag is enabled' do
it { is_expected.not_to be_retryable }
end
context 'when prevent_retry_of_retried_jobs feature flag is disabled' do
before do
stub_feature_flags(prevent_retry_of_retried_jobs: false)
end
it { is_expected.to be_retryable }
end
it { is_expected.not_to be_retryable }
end
end
end
......
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