datalad / datalad-usage-dashboard

Dashboard of detected usages of DataLad
MIT License
4 stars 2 forks source link

last update -- weeks ago, apparently has been errorring out #25

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago

not sure why nobody of us noticed -- let's blame holidays

https://github.com/datalad/datalad-usage-dashboard/actions/runs/3827310963/jobs/6511793554#step:6:1231

  File "/home/runner/work/datalad-usage-dashboard/datalad-usage-dashboard/find_datalad_repos/github.py", line 160, in get_repo_stars
    r.raise_for_status()
  File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.github.com/repos/bids-standard/bids-schema
Error: Process completed with exit code 1.

not sure what it is about since it is public repo.

jwodder commented 1 year ago

@yarikoptic My best guess is that we're hitting an API rate limit, except (a) the limit should be 5000 requests per hour, and it doesn't look like we're making more than 1200 requests before failing (Unless the rate limit is shared among all tokens for the user in question? The documentation isn't clear), and (b) the HTTP "reason" should mention rate limiting (unless we're using HTTP/2, but I don't think requests supports that yet). We might be hitting a secondary rate limit, but I'm not entirely sure how to detect that. For now, I'm just going to make the code output the response body when this error occurs so we get more detail.

yarikoptic commented 1 year ago

We might indeed be getting too many results now for querying for RUNCMD commits, judging from the number of those Found commit log lines. I wonder if we could instrument query a little more to limit time period to go back only slightly behind the last sync time or something like that.

jwodder commented 1 year ago

@yarikoptic With the ability to see the response body, we get:

{
    "message": "`bids-standard` forbids access via a personal access token (classic). Please use a GitHub App, OAuth App, or a personal access token with fine-grained permissions.",
    "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"
}

So apparently we just need to replace the token used with a new one that follows GitHub's new format (which will be any token generated today).

yarikoptic commented 1 year ago

oh, damn -- the same issue as we had with con/tinuous logs of it. I have now updated SEARCH_GITHUB_TOKEN secret with that same token. And will rerun the recent workflow -- let's see if helps

yarikoptic commented 1 year ago

last commit 6 hours ago, so - was addressed