Closed andreschab90 closed 1 year ago
My team is also experiencing this issue. We are a fairly small team (~8 android engineers) and are being rate limited on our CI a few times a week.
This line may be the cause of the issue. When no version is specified for Flank, a network request is made to fetch the latest version. This request uses an empty string for the token instead of getting it from the env variable.
Unfortunately I do not have capacity to create a pull request but would greatly appreciate if someone else could.
Describe the bug
To Reproduce
Expected behavior
Details (please complete the following information):
Additional context
Run Flank/flank@master Run curl -L https://github.com/Flank/flank/releases/download/flank-scripts-1.9.1/flank-scripts.jar --output flank-scripts.jar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
77 15.8M 77 12.3M 0 0 16.5M 0 --:--:-- --:--:-- --:--:-- 16.5M 100 15.8M 100 15.8M 0 0 20.3M 0 --:--:-- --:--:-- --:--:-- 110M Run ./flankScripts github download_flank --version= Exception in thread "main" Error while doing GitHub request, because of API rate limit exceeded for 199.19.85.81. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.), more info at https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting at flank.scripts.utils.exceptions.FlankScriptsExceptionMappersKt.toGithubException(FlankScriptsExceptionMappers.kt:17) at flank.scripts.utils.exceptions.FlankScriptsExceptionMappersKt$mapClientErrorToGithubException$1.invoke(FlankScriptsExceptionMappers.kt:15) at flank.scripts.utils.exceptions.FlankScriptsExceptionMappersKt$mapClientErrorToGithubException$1.invoke(FlankScriptsExceptionMappers.kt) at flank.scripts.utils.exceptions.FlankScriptsExceptionMappersKt.mapClientError(FlankScriptsExceptionMappers.kt:11) at flank.scripts.utils.exceptions.FlankScriptsExceptionMappersKt.mapClientErrorToGithubException(FlankScriptsExceptionMappers.kt:15) at flank.scripts.data.github.GithubApiKt.getLatestReleaseTag(GithubApi.kt:58) at flank.scripts.data.github.GithubApiKt$getLatestReleaseTag$1.invokeSuspend(GithubApi.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking(Builders.kt:59) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking$default(Builders.kt:38) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) at flank.scripts.cli.github.DownloadFlankCommand.run(DownloadFlankCommand.kt:19) at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:170) at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:179) at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:179) at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:16) at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:258) at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:255) at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:273) at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:298) at flank.scripts.cli.MainKt.main(Main.kt:29)