MShekow / renovate-pr-visualization

MIT License
6 stars 2 forks source link

[GitLab] UserWarning: Calling a `list()` method without specifying `get_all=True` or `iterator=True` will return a maximum of 20 items #8

Closed szpak closed 1 month ago

szpak commented 2 months ago

I've got a GitLab provider a try (big thanks @robrobert99 for your contribution!) and for some "sample repo", I see the following warning in the logs:

datascraper | Fetching repository onboarding statuses for 1 repos (this may take several minutes) ... 0%| | 0/1 [00:00<?, ?it/s]/app/client_impl/gitlab_client.py:71: UserWarning: Calling a list() method without specifying get_all=True or iterator=True will return a maximum of 20 items. Your query returned 20 of many items. See https://python-gitlab.readthedocs.io/en/v4.6.0/api-usage.html#pagination for more details. If this was done intentionally, then this warning can be supressed by adding the argument get_all=False to the list() call. (python-gitlab: /app/client_impl/gitlab_client.py:71) datascraper | gl_commits: List[ProjectCommit] = self._gl_project.commits.list(since=since.isoformat())

I believe, for larger repos "20 items" for commits is not enough (for number of PRs/MRs rather as well).

(btw, I'm still fighting with metabase using H2 instead of Postgres, so I don't see the result, but that could be due to the networking changes I had to introduce, so I will ask about that once analyzed)

szpak commented 2 months ago

(btw, I'm still fighting with metabase using H2 instead of Postgres, so I don't see the result, but that could be due to the networking changes I had to introduce, so I will ask about that once analyzed)

It was a problem with my local docker-compose volumes configuration (I didn't noticed that the preconfigured metabase H2 DB is provided in Git repository)

szpak commented 2 months ago

for number of PRs/MRs rather as well

Btw, it is not a problem for PRs: mr_params = {'state': 'all', 'get_all': True}. Just for commits.