Skip to content

fix jobs; broken because of breaking change in python-gitlab 4

Steffen Michels requested to merge fixJobs into main

What does this MR do?

This adapts to the list API of python-gitlab version 4. The as_list=False option did not work anymore, see https://python-gitlab.readthedocs.io/en/stable/changelog.html#v4-0-0-2023-10-17.

As a result, the following warning was produced and the job did not have the desired effect:

2024-06-24 15:18:02+0000 [-] /usr/src/app/website/jobs.py:101: builtins.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 43 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: /usr/src/app/website/jobs.py:101)

Changes to public APIs

Author's checklist (required)

  • Newly added code is documented (guidelines)
  • Newly added code has a style consistent with the rest of the repository
  • Intermediate commits compile (use git rebase -i main if not)

Related issues

Edited by Steffen Michels

Merge request reports

Loading