-
Notifications
You must be signed in to change notification settings - Fork 17
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
GitHub API rate limits are too often reached causing end to end tests to fail #422
Comments
Influence of polling retry on a single testretry = 2000msWhen running a single feature (HC-07) with A total of 180 API calls are consumed. We notice a constant usage throughout the tests, due to polling the GH API and checking on the sandbox PR status. In addition there is a higher usage at the beginning and at the end of each tests (2 tests here) for the creation/deletion of the branches and the creation/commenting/close of the PRs. retry = 10000msWhen increasing the polling timeout from 2000ms to 10000ms we get the following result: A total of 82 api calls are consumed. We can notice that the polling is less resource hungry and we can better see the api calls consumed by initialization and cleanup. ComparisonFirst scenario in Blue, second in orange |
Experiment on timeouts on complete suite of smoke testsRetry=2000ms; concurrency=2When running the full end to end tests with smoke tagging with timeout set to 2000ms A Total of 3022 API calls are consumed. Retry=10000ms; concurrency=2When running the full end to end tests with smoke tagging with timeout set to 10000ms: A total of 1188 API calls are consumed Merged plots:
|
Experiment with concurrencyGiven a shorter retry timeout, how does API usage looks like when we increase concurrency.
Unsurprisingly total api usage is similar, but concurrency=5 completes much faster All scenarios previous scenarios compared
|
Testing how rate limits reprovisioning worksWhen does the bot gets its api calls back ? Let's wait until we're back to 5000
Conclusion: after 1 hour after the first API calls, budget is given back. |
During end to end tests, we query the GitHub API regularly to check if the pipeline associated with the test PR has completed. This commit increase the retry timeout in order to decrease the total amount of API calls that the bot account is performing. This helps with staying within the GitHub API rate limits as highlighted in openshift-helm-charts#422. Signed-off-by: Matthias Goerens <[email protected]>
During end to end tests, we query the GitHub API regularly to check if the pipeline associated with the test PR has completed. This commit increase the retry timeout in order to decrease the total amount of API calls that the bot account is performing. This helps with staying within the GitHub API rate limits as highlighted in #422. Signed-off-by: Matthias Goerens <[email protected]> Co-authored-by: mgoerens <41898282+github-actions[bot]@users.noreply.github.com>
It is allowed to do 5000 calls to the GitHub API per hour, see this doc. The
openshift-helm-charts-bot
regularly hits the maximum, causing end to end tests to fail.This typically occurs when opening multiple PRs as multiple pipeline are ran in parallel. Concurrency (currently set to 2) of tests within a pipeline also puts additional pressure on the API usage of the bot.
The text was updated successfully, but these errors were encountered: