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
2b8dcb45
Commit
2b8dcb45
authored
Mar 13, 2022
by
Jaspreet Singh
Committed by
Andy Soiron
Mar 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable API kaminari count with limit
Changelog: changed
parent
4bd3d389
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
config/feature_flags/ops/api_kaminari_count_with_limit.yml
config/feature_flags/ops/api_kaminari_count_with_limit.yml
+2
-2
doc/api/features.md
doc/api/features.md
+1
-1
lib/gitlab/pagination/offset_pagination.rb
lib/gitlab/pagination/offset_pagination.rb
+1
-1
No files found.
config/feature_flags/ops/api_kaminari_count_with_limit.yml
View file @
2b8dcb45
---
---
name
:
api_kaminari_count_with_limit
name
:
api_kaminari_count_with_limit
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/23931
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/23931
rollout_issue_url
:
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/353077
milestone
:
'
11.8'
milestone
:
'
11.8'
type
:
ops
type
:
ops
group
:
group::integrations
group
:
group::integrations
default_enabled
:
fals
e
default_enabled
:
tru
e
doc/api/features.md
View file @
2b8dcb45
...
@@ -95,7 +95,7 @@ Example response:
...
@@ -95,7 +95,7 @@ Example response:
"milestone"
:
"11.8"
,
"milestone"
:
"11.8"
,
"type"
:
"ops"
,
"type"
:
"ops"
,
"group"
:
"group::ecosystem"
,
"group"
:
"group::ecosystem"
,
"default_enabled"
:
fals
e
"default_enabled"
:
tru
e
},
},
{
{
"name"
:
"marginalia"
,
"name"
:
"marginalia"
,
...
...
lib/gitlab/pagination/offset_pagination.rb
View file @
2b8dcb45
...
@@ -27,7 +27,7 @@ module Gitlab
...
@@ -27,7 +27,7 @@ module Gitlab
end
end
return
pagination_data
unless
pagination_data
.
is_a?
(
ActiveRecord
::
Relation
)
return
pagination_data
unless
pagination_data
.
is_a?
(
ActiveRecord
::
Relation
)
return
pagination_data
unless
Feature
.
enabled?
(
:api_kaminari_count_with_limit
,
type: :ops
)
return
pagination_data
unless
Feature
.
enabled?
(
:api_kaminari_count_with_limit
,
type: :ops
,
default_enabled: :yaml
)
limited_total_count
=
pagination_data
.
total_count_with_limit
limited_total_count
=
pagination_data
.
total_count_with_limit
if
limited_total_count
>
Kaminari
::
ActiveRecordRelationMethods
::
MAX_COUNT_LIMIT
if
limited_total_count
>
Kaminari
::
ActiveRecordRelationMethods
::
MAX_COUNT_LIMIT
...
...
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