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

Guess download URL #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

timdp
Copy link

@timdp timdp commented Sep 15, 2022

We're running asdf at scale. This can lead to throttling on the call to api.github.com to fetch release information—even with an API token.

We're looking to run asdf less often, but nonetheless, we've found that the call to api.github.com can actually be avoided in most cases. After all, it's only used to get the URL to the release binary, and that one uses a predictable format for recent versions.

As such, this patch eagerly tries to predict the download URL, and falls back to the API approach if that doesn't work. With most installs, this should be faster and cheaper.

lsanwick added a commit to lsanwick/asdf-jq that referenced this pull request Jun 1, 2023
Migrated code from AZMCode#7

Thanks @timdp!

Test Plan:
- [x] Uninstall jq, and then ran `asdf install jq 1.6`, validated that I saw a correct guess and download.
lsanwick added a commit to lsanwick/asdf-jq that referenced this pull request Jun 1, 2023
Migrated code from AZMCode#7

Thanks @timdp!

Test Plan:
- [x] Uninstall jq, and then ran `asdf install jq 1.6`, validated that I saw a correct guess and download.
iGEL pushed a commit to pitch-io/asdf-jq that referenced this pull request Feb 1, 2024
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.

1 participant