newrelic-experimental / gitlab

Gitlab exporters to send metrics,logs,traces to New Relic
9 stars 6 forks source link

Unable to get data for >20 runners #33

Closed ksorn24 closed 8 months ago

ksorn24 commented 8 months ago

Hello,

Our instance has over 20 runners and it appears 20 is the current limit in how much the tool can list out. I am seeing this in the log during the pipeline schedule:

/app/get_resources.py:52: 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 35 items. See https://python-gitlab.readthedocs.io/en/v4.2.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/local/lib/python3.10/site-packages/gitlab/client.py:956) runners = gl.runners_all.list()

Currently, I have the GLAB_RUNNERS_SCOPE variable set to "all"

dpacheconr commented 8 months ago

@ksorn24 can you please try on release 1.0.13 let us know the outcome

ksorn24 commented 8 months ago

Perfect, just tested it and it works. Thanks!