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
ce8500b9
Commit
ce8500b9
authored
Apr 27, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/security/gitlab@13-11-stable-ee
parent
bc299f54
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
5 deletions
+10
-5
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+1
-1
app/services/projects/branches_by_mode_service.rb
app/services/projects/branches_by_mode_service.rb
+1
-1
changelogs/unreleased/security-322500-disable-gitaly-branch-pagination-ff-by-default.yml
...322500-disable-gitaly-branch-pagination-ff-by-default.yml
+5
-0
config/feature_flags/development/branch_list_keyset_pagination.yml
...ature_flags/development/branch_list_keyset_pagination.yml
+1
-1
lib/gitlab/pagination/gitaly_keyset_pager.rb
lib/gitlab/pagination/gitaly_keyset_pager.rb
+2
-2
No files found.
app/controllers/projects/branches_controller.rb
View file @
ce8500b9
...
...
@@ -185,7 +185,7 @@ class Projects::BranchesController < Projects::ApplicationController
# Here we get one more branch to indicate if there are more data we're not showing
limit
=
@overview_max_branches
+
1
if
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
true
)
if
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
:yaml
)
@active_branches
=
BranchesFinder
.
new
(
@repository
,
{
per_page:
limit
,
sort:
sort_value_recently_updated
})
.
execute
(
gitaly_pagination:
true
).
select
(
&
:active?
)
...
...
app/services/projects/branches_by_mode_service.rb
View file @
ce8500b9
...
...
@@ -37,7 +37,7 @@ class Projects::BranchesByModeService
def
use_gitaly_pagination?
return
false
if
params
[
:page
].
present?
||
params
[
:search
].
present?
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
true
)
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
:yaml
)
end
def
fetch_branches_via_offset_pagination
...
...
changelogs/unreleased/security-322500-disable-gitaly-branch-pagination-ff-by-default.yml
0 → 100644
View file @
ce8500b9
---
title
:
Disable keyset pagination for branches by default
merge_request
:
author
:
type
:
security
config/feature_flags/development/branch_list_keyset_pagination.yml
View file @
ce8500b9
...
...
@@ -5,4 +5,4 @@ rollout_issue_url:
milestone
:
'
13.2'
type
:
development
group
:
group::source code
default_enabled
:
tru
e
default_enabled
:
fals
e
lib/gitlab/pagination/gitaly_keyset_pager.rb
View file @
ce8500b9
...
...
@@ -26,11 +26,11 @@ module Gitlab
private
def
keyset_pagination_enabled?
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
true
)
&&
params
[
:pagination
]
==
'keyset'
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
:yaml
)
&&
params
[
:pagination
]
==
'keyset'
end
def
paginate_first_page?
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
true
)
&&
(
params
[
:page
].
blank?
||
params
[
:page
].
to_i
==
1
)
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
:yaml
)
&&
(
params
[
:page
].
blank?
||
params
[
:page
].
to_i
==
1
)
end
def
paginate_via_gitaly
(
finder
)
...
...
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