Commit 9dd0ce0b authored by Furkan Ayhan's avatar Furkan Ayhan

Remove the FF skip_dag_manual_and_delayed_jobs

It has been enabled for a milestone
parent b005bd81
...@@ -26,14 +26,6 @@ module Ci ...@@ -26,14 +26,6 @@ module Ci
end end
def valid_statuses_for_build(build) def valid_statuses_for_build(build)
if ::Feature.enabled?(:skip_dag_manual_and_delayed_jobs, build.project, default_enabled: :yaml)
current_valid_statuses_for_build(build)
else
legacy_valid_statuses_for_build(build)
end
end
def current_valid_statuses_for_build(build)
case build.when case build.when
when 'on_success', 'manual', 'delayed' when 'on_success', 'manual', 'delayed'
build.scheduling_type_dag? ? %w[success] : %w[success skipped] build.scheduling_type_dag? ? %w[success] : %w[success skipped]
...@@ -45,23 +37,6 @@ module Ci ...@@ -45,23 +37,6 @@ module Ci
[] []
end end
end end
def legacy_valid_statuses_for_build(build)
case build.when
when 'on_success'
build.scheduling_type_dag? ? %w[success] : %w[success skipped]
when 'on_failure'
%w[failed]
when 'always'
%w[success failed skipped]
when 'manual'
%w[success skipped]
when 'delayed'
%w[success skipped]
else
[]
end
end
end end
end end
......
---
title: Remove the FF skip_dag_manual_and_delayed_jobs
merge_request: 57086
author:
type: other
---
name: skip_dag_manual_and_delayed_jobs
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50765
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/297240
milestone: '13.8'
type: development
group: group::pipeline authoring
default_enabled: true
...@@ -145,28 +145,5 @@ RSpec.describe Ci::ProcessBuildService, '#execute' do ...@@ -145,28 +145,5 @@ RSpec.describe Ci::ProcessBuildService, '#execute' do
expect { subject }.to change { build.status }.to(after_status) expect { subject }.to change { build.status }.to(after_status)
end end
end end
context 'when FF skip_dag_manual_and_delayed_jobs is disabled on the project' do
let_it_be(:other_project) { create(:project) }
before do
stub_feature_flags(skip_dag_manual_and_delayed_jobs: other_project)
end
where(:build_when, :current_status, :after_status) do
:on_success | 'success' | 'pending'
:on_success | 'skipped' | 'skipped'
:manual | 'success' | 'manual'
:manual | 'skipped' | 'manual'
:delayed | 'success' | 'manual'
:delayed | 'skipped' | 'manual'
end
with_them do
it 'proceeds the build' do
expect { subject }.to change { build.status }.to(after_status)
end
end
end
end 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