fix: resolve "latest" without api.github.com - #1
Merged
Merged
Conversation
mario4tier
force-pushed
the
fix/resolve-latest-without-the-api
branch
3 times, most recently
from
September 6, 2026 23:50
048535a to
8ec2d19
Compare
The version lookup used api.github.com, which allows 60 requests/hour per IP. GitHub-hosted runners share IPs, so on a busy hour it answers 403 and the action dies -- and because curl and python ran in a pipeline, what the user saw was a JSONDecodeError, not a rate limit. Resolve from github.com's documented /releases/latest redirect instead. No API, no quota, no parser. This is what the shell installers for golangci-lint, trivy and syft all do. Also --retry 3 on the asset downloads, for transient 5xx, and a smoke test: the action had no CI.
mario4tier
force-pushed
the
fix/resolve-latest-without-the-api
branch
from
September 6, 2026 23:50
8ec2d19 to
cfe56f1
Compare
Member
|
Rad! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
api.github.comallows 60 requests/hour per IP, and GitHub-hosted runnersshare IPs. On a busy hour the version lookup gets a 403 and the action dies —
this reddened an unrelated PR on
ta-lib-pythontoday. Worse,curlandpython3ran in a pipeline, so the visible error was aJSONDecodeError, not arate limit.
Before
After — github.com's
/releases/latestredirect, which GitHub documents andwhich carries no rate-limit quota:
No API, no quota, no JSON parser.
It is the common pattern
Shell installers avoid the API rather than authenticate it.
golangci-lint,trivyandsyftall resolve "latest" fromgithub.com—grep -c api.github.comis 0 in all threeinstall.shfiles. (They use theAccept: application/jsonvariant of the same URL; the redirect used here isthe form GitHub actually documents, under "Linking to releases".)
Tested
Resolution, against live repos:
Failure modes stay loud, which matters most — a wrong version installs silently:
curl: (22) ... 404, exit 22actions/toolkit) → redirect has no/tag/, so theguard fires with a clear message rather than returning a bad version
Also here
--retry 3on the three asset downloads, for transient 5xx and timeouts. No--retry-delay, so curl keeps its own exponential backoff..github/workflows/test.yml— the action had no CI, so it has never actuallybeen exercised. Installs on ubuntu/macos/windows ×
latest/0.7.1, and checksthe reported version against the installed header.