chaoss / chaoss/grimoirelab-perceval

Gitlab API changing pagination (new keyset pagination system)

Open
#780 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
324
Forks
187
PR merge metrics
No merged PRs in 30d

Description

Gitlab is changing the API pagination. [Here](https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree) the warning says the following:

> This endpoint is changing to keyset-based pagination. Iterating pages of results with a number (?page=2) [is deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67509). Support for iterating with a number will become unsupported in GitLab 15.0. Use the new [keyset pagination system](https://docs.gitlab.com/ee/api/index.html#keyset-based-pagination) instead.

It seems we may use that method [here](https://github.com/chaoss/grimoirelab-perceval/blob/fe6f3c944a455c9883f5d40f6e808dc394f7db88/perceval/backends/core/gitlab.py#L480
) , but at least [here](https://github.com/chaoss/grimoirelab-perceval/blob/fe6f3c944a455c9883f5d40f6e808dc394f7db88/perceval/backends/core/gitlab.py#L678) we are using the old one that is going to be removed on Gitlab 15 (to be released on May 22, 2022)

Contributor guide

Open the contributing guide

Research direction

Start in perceval/backends/core/gitlab.py, especially the pagination handling around lines 480 and 678, and compare those requests with GitLab's keyset pagination documentation. Update the affected pagination path so it no longer relies on numbered pages, then verify that repository-tree retrieval still iterates through all results.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.