github-datasource icon indicating copy to clipboard operation
github-datasource copied to clipboard

feature request: improve page-limits handling

Open gabor opened this issue 1 year ago • 2 comments

we have some hardcoded page limits in the code, for example:

  • https://github.com/grafana/github-datasource/blob/4452e594617f889d8cc846b03b02b1f17ffc5b2f/pkg/github/constants.go#L4
  • https://github.com/grafana/github-datasource/blob/4452e594617f889d8cc846b03b02b1f17ffc5b2f/pkg/github/projects/projects.go#L15

we should increase these, but if we increase them too much we'll hit rate limits. some ideas:

  1. make these user-configurable
  2. warn the user if they are trying to fetch too much data

(see https://github.com/grafana/github-datasource/pull/232 for more context)

gabor avatar May 03 '24 12:05 gabor

I ran into this yesterday. The project I was querying has hundreds of closed issues, so no matter what I did I only got the first bunch. It also seems the filters are applied after the query, so I couldn't work around the limit either 😞

natellium avatar Jun 13 '24 07:06 natellium

Possibly related given apps have much higher rate limits compared to a user PAT. https://github.com/grafana/github-datasource/issues/88

Another thing that could help is using the logged in users auth since that could scale better for concurrent users compared to using app auth

https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28

trevjonez avatar Jul 30 '24 17:07 trevjonez