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

Enable GitHub API request throttling to avoid hitting API rate limit #95

Closed
wants to merge 11 commits into from
Closed

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented Jan 4, 2024

It implements best practices for using the GitHub API as described in docs.

When the primary rate limit is hit, it will log a warning and wait before trying the API endpoint again before failing.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4dea32b) 99.37% compared to head (0ef5625) 99.37%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           typescript      #95   +/-   ##
===========================================
  Coverage       99.37%   99.37%           
===========================================
  Files               6        6           
  Lines             482      483    +1     
  Branches           50       50           
===========================================
+ Hits              479      480    +1     
  Misses              3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* Testing Farm as Git Hub Action - Typescript version

This PR aims to reimplement the current Action in a language that will
allow easier extendability and testability than the current
composite yaml/python/bash implementation.

This PR is keeping the current behavior/inputs/outputs except:

- input debug - removed - we should use the native version of running Actions in debug mode
  - https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging

* doc: update format of USAGE.md

* Basic integration test

* fix: apply the requested changes

* remove makefile, no longer in use

* doc: More documentation

* doc: Add `DEVELOPMENT` document

* ci: drop schedule for codeql analysis
)

* fix: parse from tf response only things that we use

* refactor: pass pr object directly to action()

* fix: set status to failed when error occurs
…y display Details url when tests fail (#88)

* fix: update status description to show uncropped message

* fix: missing url in status when tests fail

* test: update test for pull request comments
…tegration tests (#89)

* doc: update README - remove references to old implementation & update wording

* make url in summary clickable

* test: integration test for timeout

* test: integration test for private scope and statuses

* test: integration test for issue comment

* test: integration test for failed Testing Farm job

* test: integration test for infra issues
from: `Testing Farm test failed - summary`
to: `Build finished${infraError} - summary`
It implements best practices for using the GitHub API as described in
https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits

When the primary rate limit is hit, it will log a warning and wait before
trying the API endpoint one more time before failing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants