Closed Raznic closed 10 months ago
I suspect this may also be the same issue as #26 based on the description and symptoms.
Yes, that looks similar and GitHub replied to us that their rate limit should be uncommon, yet didn't provide any details. I guess the avalanche of requests in a very short period of time might indeed hit the rate limit.
If you place the unzipped into XCRC
directory, the plugin will not try to redownload it. I can suggest introducing on CI machines a post-checkout
and pre-pod_install
step to fetch it from your cache (either local or owned-by-you location) to resolve that problem?
Yup, I think downloading the tools from a cache is a good solution in this case. Thanks for the help!
My integration setup
[x] CocoaPods cocoapods-xcremotecache plugin [ ] Automatic integration using
xcprepare integrate ...
[ ] Manual integration [ ] CarthageExpected/desired behavior Recently we started to encounter
403 rate limit exceeded
errors while installing/configuring XCRemoteCache in our CI/CD pipelines (see stacktrace below). The error would present itself for a bit across multiple workflows, and then disappear after a period of time. Digging into the source code, the 403 error appears to be coming from the GitHub API for fetching the latest release. From personal experience I know that the GitHub API can be somewhat aggressive in terms of rate limiting requests, so it's probably not surprising this started to happen as we integrated the tool with more and more workflows.By default our Pods directory is located in the CI/CD job workspace, which gets cleared after each run and thus requires us to redownload the XCRC binaries for each subsequent run. One potential workaround would be to install the XCRC binaries to a more permanent location on our CI/CD workers so they don't have to be downloaded every time. However, it looks like the pre_install hook expects them to always be located in the local user Pod directory. We might be able to do some magic with path traversal, but that feels pretty hacky and prone to error.
Minimal reproduction of the problem with instructions Run the
pre_install
hook a bunch of times in a short timespan to trigger the rate-limit on GitHub's API.Producer Logs N/A - issue is with tool installation
Consumer Logs N/A - issue is with tool installation
Environment
Post build stats N/A - issue is with tool installation
Others N/A