Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1fccaf9c
Commit
1fccaf9c
authored
Jan 05, 2021
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_pipelines_for_merge_request_finder_new_cte feature flag
This commit removes the flag as it's deemed stable.
parent
ceaefe24
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
43 deletions
+6
-43
app/finders/ci/pipelines_for_merge_request_finder.rb
app/finders/ci/pipelines_for_merge_request_finder.rb
+1
-17
changelogs/unreleased/remove-ci_pipelines_for_merge_request_finder_new_cte-feature-flag.yml
...pelines_for_merge_request_finder_new_cte-feature-flag.yml
+5
-0
config/feature_flags/development/ci_pipelines_for_merge_request_finder_new_cte.yml
...lopment/ci_pipelines_for_merge_request_finder_new_cte.yml
+0
-8
spec/finders/ci/pipelines_for_merge_request_finder_spec.rb
spec/finders/ci/pipelines_for_merge_request_finder_spec.rb
+0
-18
No files found.
app/finders/ci/pipelines_for_merge_request_finder.rb
View file @
1fccaf9c
...
...
@@ -34,11 +34,7 @@ module Ci
pipelines
=
if
merge_request
.
persisted?
if
Feature
.
enabled?
(
:ci_pipelines_for_merge_request_finder_new_cte
,
target_project
)
pipelines_using_cte
else
pipelines_using_legacy_cte
end
pipelines_using_cte
else
triggered_for_branch
.
for_sha
(
commit_shas
)
end
...
...
@@ -49,18 +45,6 @@ module Ci
private
def
pipelines_using_legacy_cte
cte
=
Gitlab
::
SQL
::
CTE
.
new
(
:shas
,
merge_request
.
all_commits
.
select
(
:sha
))
source_sha_join
=
cte
.
table
[
:sha
].
eq
(
Ci
::
Pipeline
.
arel_table
[
:source_sha
])
merged_result_pipelines
=
filter_by
(
triggered_by_merge_request
,
cte
,
source_sha_join
)
detached_merge_request_pipelines
=
filter_by_sha
(
triggered_by_merge_request
,
cte
)
pipelines_for_branch
=
filter_by_sha
(
triggered_for_branch
,
cte
)
Ci
::
Pipeline
.
with
(
cte
.
to_arel
)
# rubocop: disable CodeReuse/ActiveRecord
.
from_union
([
merged_result_pipelines
,
detached_merge_request_pipelines
,
pipelines_for_branch
])
end
def
pipelines_using_cte
cte
=
Gitlab
::
SQL
::
CTE
.
new
(
:shas
,
merge_request
.
all_commits
.
select
(
:sha
))
...
...
changelogs/unreleased/remove-ci_pipelines_for_merge_request_finder_new_cte-feature-flag.yml
0 → 100644
View file @
1fccaf9c
---
title
:
Improve the database query performance on the pipeline loading in merge requests
merge_request
:
50818
author
:
type
:
performance
config/feature_flags/development/ci_pipelines_for_merge_request_finder_new_cte.yml
deleted
100644 → 0
View file @
ceaefe24
---
name
:
ci_pipelines_for_merge_request_finder_new_cte
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49083
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/291006
milestone
:
'
13.7'
type
:
development
group
:
group::continuous integration
default_enabled
:
false
spec/finders/ci/pipelines_for_merge_request_finder_spec.rb
View file @
1fccaf9c
...
...
@@ -225,24 +225,6 @@ RSpec.describe Ci::PipelinesForMergeRequestFinder do
branch_pipeline_2
,
branch_pipeline
])
end
context
'when ci_pipelines_for_merge_request_finder_new_cte feature flag is disabled'
do
before
do
stub_feature_flags
(
ci_pipelines_for_merge_request_finder_new_cte:
false
)
end
it
'returns only related merge request pipelines'
do
expect
(
subject
.
all
)
.
to
eq
([
detached_merge_request_pipeline
,
branch_pipeline_2
,
branch_pipeline
])
expect
(
described_class
.
new
(
merge_request_2
,
nil
).
all
)
.
to
eq
([
detached_merge_request_pipeline_2
,
branch_pipeline_2
,
branch_pipeline
])
end
end
end
context
'when detached merge request pipeline is run on head ref of the merge request'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment