Skip to content

fix(installer): avoid GitHub API rate-limit failures - #1198

Open
nadaverell wants to merge 3 commits into
mainfrom
fix/installer-latest-release-lookup
Open

fix(installer): avoid GitHub API rate-limit failures#1198
nadaverell wants to merge 3 commits into
mainfrom
fix/installer-latest-release-lookup

Conversation

@nadaverell

@nadaverell nadaverell commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The public bootstrap could download successfully and then fail at Fetching latest release.... Both installers discovered the latest tag through the unauthenticated GitHub REST API, whose per-IP quota is shared by users behind the same corporate NAT, VPN, or CI egress.

This changes only bootstrap release discovery. The POSIX and PowerShell installers now use the ordinary GitHub latest-release redirect and no longer depend on that REST quota.

Mechanism

Both installers request:

https://github.com/skyhook-io/radar/releases/latest

They follow the redirect, require its final destination to be the exact HTTPS Radar release-tag path, validate the tag as semantic-version syntax, and then construct the existing versioned release-asset URL. Unexpected hosts, paths, ports, credentials, query strings, fragments, or tag formats fail before a temporary directory or download is created.

  • install.sh reads curl url_effective and compares the complete final URL.
  • install.ps1 reads the final response URI using the respective Windows PowerShell 5.1 and PowerShell 7 response shapes.
  • The asset naming, install directories, aliases, and reinstall behavior are unchanged.
  • A path-filtered workflow runs ShellCheck and complete installs on Ubuntu, Windows PowerShell 5.1, and PowerShell 7. It also rejects future api.github.com discovery in either bootstrap script.

There is deliberately no fallback to releases.skyhook.io. Bootstrap only needs a tag, and using the GitHub redirect avoids adding first-party service availability or update telemetry to the initial install path. The in-product update resolver and desktop updater have different metadata requirements and are outside this change.

Publication boundary

Merging this PR does not create a Radar tag, binary release, image, chart, or package-manager artifact. However, the public get.radarhq.io endpoints serve the installer files from main, so merging is a live installer publication after the existing cache window. Rollback is a revert on main and the same cache propagation path.

How to test each request

1. Bootstrap script delivery

curl -fsS https://get.radarhq.io -o /tmp/radar-install.sh
sh -n /tmp/radar-install.sh
grep -F github.com/skyhook-io/radar/releases/latest /tmp/radar-install.sh
! grep -Fq api.github.com /tmp/radar-install.sh

Expected: HTTP 200, valid shell syntax, the browser-facing latest-release URL is present, and the REST API hostname is absent.

2. Latest-tag discovery

curl -fsSL -o /dev/null \
  -w "status=%{http_code}\neffective_url=%{url_effective}\n" \
  https://github.com/skyhook-io/radar/releases/latest

Expected: HTTP 200 and an effective URL of https://github.com/skyhook-io/radar/releases/tag/v<version>.

3. Versioned release asset

release_url=$(curl -fsSL -o /dev/null -w "%{url_effective}" \
  https://github.com/skyhook-io/radar/releases/latest)
tag=${release_url##*/}
version=${tag#v}
curl -fsSI \
  "https://github.com/skyhook-io/radar/releases/download/${tag}/radar_v${version}_darwin_arm64.tar.gz"

Expected: GitHub returns the release-asset redirect. Substitute the target OS and architecture as needed.

4. Complete installers

The Installer smoke tests workflow runs the checked-out scripts end to end on Ubuntu, Windows PowerShell 5.1, and PowerShell 7, then executes the installed kubectl-radar --version. Use a disposable host if testing the public script manually because it writes to the normal system/user install location.

Validation

  • sh -n install.sh
  • static no-API guard for both installers
  • live latest-release redirect: HTTP 200 to v1.9.0
  • live v1.9.0 macOS arm64 asset response
  • make tsc
  • make test
  • make build
  • visual test skipped: no UI delta

Scope

This PR does not change install destinations, command aliases, artifact verification, the in-product update checker, the desktop updater, or any release/publishing workflow.

Type of change

  • Bug fix (non-breaking)
  • Installer smoke coverage
  • UI change

@nadaverell
nadaverell requested a review from hisco as a code owner July 16, 2026 21:21
@nadaverell
nadaverell force-pushed the fix/installer-latest-release-lookup branch from d71e532 to eee2f51 Compare August 3, 2026 08:47
@nadaverell nadaverell changed the title fix(installer): avoid GitHub API rate limits fix(installer): avoid GitHub API rate-limit failures Aug 3, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 77f9bc8. Configure here.

Comment thread .github/workflows/installers.yml
@nadaverell
nadaverell force-pushed the fix/installer-latest-release-lookup branch from 77f9bc8 to 0e69f0a Compare August 5, 2026 15:05
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