Commit 90c793bd authored by Alessio Caiazza's avatar Alessio Caiazza

Remove track_mr_picking feature flag

Merge requests cherry-pick tracking is now a proper feature
parent 7b0b5919
......@@ -11,8 +11,6 @@ module Commits
private
def track_mr_picking(pick_sha)
return unless Feature.enabled?(:track_mr_picking, project)
merge_request = project.merge_requests.by_merge_commit_sha(@commit.sha).first
return unless merge_request
......
......@@ -38,8 +38,6 @@ module Deployments
.commits_between(from, to)
.map(&:id)
track_mr_picking = Feature.enabled?(:track_mr_picking, project)
# For some projects the list of commits to deploy may be very large. To
# ensure we do not end up running SQL queries with thousands of WHERE IN
# values, we run one query per a certain number of commits.
......@@ -53,8 +51,6 @@ module Deployments
deployment.link_merge_requests(merge_requests)
next unless track_mr_picking
picked_merge_requests =
project.merge_requests.by_cherry_pick_sha(slice)
......
......@@ -61,18 +61,6 @@ describe Commits::CherryPickService do
expect(mr_notes.length).to eq(1)
expect(mr_notes[0].commit_id).to eq(result[:result])
end
context 'when :track_mr_picking feature flag is disabled' do
before do
stub_feature_flags(track_mr_picking: false)
end
it 'does not add system notes' do
expect do
cherry_pick(merge_commit_sha, branch_name)
end.not_to change { Note.count }
end
end
end
def find_cherry_pick_notes(noteable)
......
......@@ -160,53 +160,6 @@ describe Deployments::LinkMergeRequestsService do
expect(deploy.merge_requests).to be_empty
end
context 'when :track_mr_picking feature flag is disabled' do
before do
stub_feature_flags(track_mr_picking: false)
end
it 'does not link picked merge requests' do
environment = create(:environment, project: project)
deploy =
create(:deployment, :success, project: project, environment: environment)
picked_mr = create(
:merge_request,
:merged,
merge_commit_sha: '123abc',
source_project: project,
target_project: project
)
mr1 = create(
:merge_request,
:merged,
merge_commit_sha: mr1_merge_commit_sha,
source_project: project,
target_project: project
)
# mr1 includes c1c67abba which is a cherry-pick of the fake picked_mr merge request
create(:track_mr_picking_note, noteable: picked_mr, project: project, commit_id: 'c1c67abbaf91f624347bb3ae96eabe3a1b742478')
mr2 = create(
:merge_request,
:merged,
merge_commit_sha: mr2_merge_commit_sha,
source_project: project,
target_project: project
)
described_class.new(deploy).link_merge_requests_for_range(
first_deployment_sha,
mr2_merge_commit_sha
)
expect(deploy.merge_requests).to include(mr1, mr2)
expect(deploy.merge_requests).not_to include(picked_mr)
end
end
end
describe '#link_all_merged_merge_requests' 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