Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitting rate limits in GitHub Actions #268

Closed
patchwork01 opened this issue Oct 12, 2022 · 3 comments · Fixed by #365
Closed

Hitting rate limits in GitHub Actions #268

patchwork01 opened this issue Oct 12, 2022 · 3 comments · Fixed by #365
Assignees
Milestone

Comments

@patchwork01
Copy link
Collaborator

patchwork01 commented Oct 12, 2022

Here are some builds that failed because we hit a rate limit:

https://github.com/gchq/sleeper/actions/runs/3235165786/jobs/5299217395
https://github.com/gchq/sleeper/actions/runs/3235165799/jobs/5299217705
https://github.com/gchq/sleeper/actions/runs/3235165823/jobs/5299217643

It's not yet clear what exactly caused this. It looks like the failure has only shown up when publishing check results (test report, checkstyle report, spotbugs report). It's possible we've hit a limit just with those, or it might be related to our queries in the Check Build Status workflow.

The checks we've used haven't logged out the full response from GitHub. We could try making a call explicitly to see the full output.

If we move to a single workflow with modules on different jobs instead of workflows, we could maybe aggregate the checks together into a single report at the end. That would be covered by another issue: #186

@patchwork01 patchwork01 added bug Something isn't working build-pipeline labels Oct 12, 2022
@patchwork01
Copy link
Collaborator Author

patchwork01 commented Oct 12, 2022

Re-running those jobs half an hour later, it seems to be fine now. It might not be anything to worry about. Probably best to wait and see if it happens again.

@patchwork01 patchwork01 removed the bug Something isn't working label Oct 13, 2022
@patchwork01
Copy link
Collaborator Author

I've set up a couple of branches to log rate limit usage:

main...log-rate-limits
main...log-status-check-limits

The test & linting reports don't seem to be causing a problem, but the chunk build status workflow seems to be using up a lot of the rate limit:

https://github.com/gchq/sleeper/actions/runs/3440731547/jobs/5739524851

This seems to be down to the library we're using not supporting the calls we want to make to get the recently run workflows, ie. the branch parameter on this endpoint, or more control over paging:

https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs-for-a-repository

If we replace the library with a REST library, we should be able to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant