Skip to content

Guess download URL - #7

Open
timdp wants to merge 1 commit into
AZMCode:masterfrom
timdp:guess-download-url
Open

Guess download URL#7
timdp wants to merge 1 commit into
AZMCode:masterfrom
timdp:guess-download-url

Conversation

@timdp

@timdp timdp commented Sep 15, 2022

Copy link
Copy Markdown

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