From 03ef323e6dd82bec5c068269e1766d2ee8e1efb8 Mon Sep 17 00:00:00 2001 From: Vasilii Iakliushin Date: Fri, 31 May 2024 11:05:53 +0200 Subject: [PATCH 1/2] Remove `repository_tree_gitaly_pagination` feature flag Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/340419 Enables `keyset` pagination for `api/v4/projects/:id/repository/tree` endpoint. Changelog: added --- .../development/repository_tree_gitaly_pagination.yml | 8 -------- lib/gitlab/pagination/gitaly_keyset_pager.rb | 8 ++------ 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 config/feature_flags/development/repository_tree_gitaly_pagination.yml diff --git a/config/feature_flags/development/repository_tree_gitaly_pagination.yml b/config/feature_flags/development/repository_tree_gitaly_pagination.yml deleted file mode 100644 index afae937b62ef19..00000000000000 --- a/config/feature_flags/development/repository_tree_gitaly_pagination.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: repository_tree_gitaly_pagination -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67509 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/340419 -milestone: '14.3' -type: development -group: group::source code -default_enabled: false diff --git a/lib/gitlab/pagination/gitaly_keyset_pager.rb b/lib/gitlab/pagination/gitaly_keyset_pager.rb index b7ef395c932c1e..bec38c44c4c3aa 100644 --- a/lib/gitlab/pagination/gitaly_keyset_pager.rb +++ b/lib/gitlab/pagination/gitaly_keyset_pager.rb @@ -41,9 +41,7 @@ def keyset_pagination_enabled?(finder) when TagsFinder true when ::Repositories::TreeFinder - Feature.enabled?(:repository_tree_gitaly_pagination, project) - else - false + true end end @@ -56,9 +54,7 @@ def paginate_first_page?(finder) when TagsFinder true when ::Repositories::TreeFinder - Feature.enabled?(:repository_tree_gitaly_pagination, project) - else - false + true end end -- GitLab From 0fbe8e4e5f2c9b53470cbb7e7166b280b6fb6e4c Mon Sep 17 00:00:00 2001 From: Vasilii Iakliushin Date: Tue, 4 Jun 2024 17:07:31 +0200 Subject: [PATCH 2/2] Update documentation about keyset pagination --- doc/api/rest/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/rest/index.md b/doc/api/rest/index.md index 000c1c4d709935..8faee1ba28a579 100644 --- a/doc/api/rest/index.md +++ b/doc/api/rest/index.md @@ -547,6 +547,7 @@ options: | [Projects](../projects.md) | `order_by=id` only | Authenticated and unauthenticated users. | | [Users](../users.md) | `order_by=id`, `order_by=name`, `order_by=username` | Authenticated and unauthenticated users. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/419556) in GitLab 16.5. | | [Registry Repository Tags](../container_registry.md) | `order_by=name`, `sort=asc`, or `sort=desc` only. | Authenticated users only. | +| [List repository tree](../repositories.md#list-repository-tree) | | Authenticated and unauthenticated users. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154897) in GitLab 17.1. | ### Pagination response headers -- GitLab