Skip to content

Use token in GitHubReleaseInstaller for increased rate-limits#7716

Merged
dominikschubert merged 1 commit intomasterfrom
fix-github-api-ratelimiting
Feb 20, 2023
Merged

Use token in GitHubReleaseInstaller for increased rate-limits#7716
dominikschubert merged 1 commit intomasterfrom
fix-github-api-ratelimiting

Conversation

@dominikschubert
Copy link
Member

@dominikschubert dominikschubert commented Feb 20, 2023

We're often running into rate-limits in the GitHubReleaseInstaller which calls the GitHub Rest API to get a list of artifacts for a given release. This is by default capped at 60 calls per hour (per IP) for unauthenticated calls and any further calls currently lead to pipeline failures.

In CircleCI we're now using a custom secret (GITHUB_API_TOKEN which is a personal access token from @localstack-bot without any permissions). This increases the rate-limit to 5_000 calls per hour (independent of IP)

In GitHub we're now using the intrinsic GITHUB_TOKEN secret. This increases the rate-limit to 1_000 calls per hour
(independent of IP). If we ever need a higher limit in GitHub we can also use the token, but as long as it's not necessary I feel using GITHUB_TOKEN is more reliable.

Follow-up TODO:

  • check for more GitHub API calls in LocalStack and add token
  • Use token in -ext repo

@dominikschubert dominikschubert self-assigned this Feb 20, 2023
@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests February 20, 2023 09:45 — with GitHub Actions Inactive
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! this solves the problem at least for our CI runs. we should probably document this somewhere and let user's know how to fix this for their CI.

@coveralls
Copy link

Coverage Status

Coverage: 84.998% (-0.02%) from 85.017% when pulling 5de094e on fix-github-api-ratelimiting into 35c267b on master.

@github-actions
Copy link

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 32m 3s ⏱️ - 3m 55s
1 731 tests ±0  1 382 ✔️ ±0  349 💤 ±0  0 ±0 
2 449 runs  ±0  1 758 ✔️ ±0  691 💤 ±0  0 ±0 

Results for commit 5de094e. ± Comparison against base commit 35c267b.

@dominikschubert dominikschubert merged commit 4567080 into master Feb 20, 2023
@dominikschubert dominikschubert deleted the fix-github-api-ratelimiting branch February 20, 2023 11:41
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.

3 participants