Skip to content
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

Download assets from public repository's GitHub Release without GitHub API #388

Closed
suzuki-shunsuke opened this issue Nov 10, 2021 · 2 comments · Fixed by #389
Closed

Download assets from public repository's GitHub Release without GitHub API #388

suzuki-shunsuke opened this issue Nov 10, 2021 · 2 comments · Fixed by #389
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Nov 10, 2021

I have tested if downloading assets from public repository's GitHub Releases anonymously is rate limited.
As a result of test, it seems not to be limited.
So at first aqua tries to download assets without GitHub API.
And if it failed, aqua tries again with GitHub API.
It avoids the rate limit of GitHub API.

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Nov 10, 2021
@suzuki-shunsuke
Copy link
Member Author

https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting

For unauthenticated requests, the rate limit allows for up to 60 requests per hour.
Unauthenticated requests are associated with the originating IP address, and not the user making requests.


https://docs.github.com/github/authenticating-to-github/about-githubs-ip-addresses
https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits


https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases

Each file included in a release must be under 2 GB. There is no limit on the total size of a release, nor bandwidth usage.

@suzuki-shunsuke
Copy link
Member Author

suzuki-shunsuke commented Nov 10, 2021

Test script

#!/usr/bin/env bash

set -eu

for i in $(seq 1 6000); do
  echo "$i"
  curl -sSfL -O https://github.com/suzuki-shunsuke/aqua/releases/download/v0.7.12/aqua_darwin_amd64.tar.gz
  rm aqua_darwin_amd64.tar.gz
done
$ bash test.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant