-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.289
GitHub Api 1.117
GitHub Branch Source 2.9.3
We have a multibranch pipeline configured with a GitHub App credential. We use the SSH checkout trait with another ssh credential to perform the checkout.
For one repository only, we hit about 1000 calls, excluding our shared library, to the github API with our GitHub App token. Here is the details of these calls for 1h in a single repository. We can see that there is quite a high amount of calls to the /repos/{owner}/{repository}/git/refs/heads/{branch} and /repos/{owner}/{repository} endpoints.
The high amount of calls cause our builds to sleep so we avoid being rate limited by GitHub. I believe Github branch source plugin is making most of these calls. The repo is not configured for polling and it is configured with the Discover All branches strategy.
Our Shared Library is also configured to use the GitHub SCM with a GitHub App and checkout over SSH, but we only have 1 call to /repos/{owner}/{repository} and 1 to /repos/{owner}/{repository}/branches/{branch} per build which seems normal. Although, some caching could be done there as well to further reduce the amount of calls.
Same here, Github org job with ~300 repositories, configured to scan once a day, same for childs.
For repositories with ~5PRs per day, and ~15 builds per day, we see ~700 calls which seems very weird.