Skip to content

fix(install): retry GitHub downloads with exponential backoff - #956

Merged
stephen-derosa merged 1 commit into
mainfrom
sderosa/install-retries
Sep 2, 2026
Merged

fix(install): retry GitHub downloads with exponential backoff#956
stephen-derosa merged 1 commit into
mainfrom
sderosa/install-retries

Conversation

@stephen-derosa

@stephen-derosa stephen-derosa commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The installer served at https://get.livekit.io/cli makes three unguarded curl calls to GitHub (the releases API, the archive, and checksums.txt). Any transient failure aborts the whole install, which makes CI runners flaky.

Retry each curl command, overridable for custom setting.

Also adds the missing jq prerequisite check — the script already depended on jq but only reported it as an unhelpful version parse error.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the Linux installer script (install-cli.sh) by routing GitHub network calls through a retrying fetch helper to reduce flakiness (especially on CI runners) and by adding a missing jq prerequisite check.

Changes:

  • Introduces a fetch helper that retries transient GitHub/curl failures with exponential backoff (configurable via env vars).
  • Routes GitHub API, release archive, and checksums downloads through fetch instead of direct curl calls.
  • Adds an explicit jq availability check before using it to parse the latest release JSON.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread install-cli.sh
Comment thread install-cli.sh Outdated
@stephen-derosa
stephen-derosa force-pushed the sderosa/install-retries branch 2 times, most recently from 22ed645 to 4f5e5b4 Compare September 1, 2026 16:46
@stephen-derosa
stephen-derosa force-pushed the sderosa/install-retries branch from 4f5e5b4 to 6f7bfa9 Compare September 1, 2026 16:48
Comment thread install-cli.sh
@stephen-derosa
stephen-derosa requested a review from u9g September 1, 2026 17:05
Comment thread install-cli.sh
u9g
u9g previously approved these changes Sep 1, 2026

@u9g u9g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, not sure about text/negative max attemps or retry delay guards make sense though.

Comment thread install-cli.sh
@u9g
u9g self-requested a review September 1, 2026 17:14
@u9g
u9g dismissed their stale review September 1, 2026 17:15

I think we should put defaults in the install retries first.

@stephen-derosa
stephen-derosa merged commit 69992e8 into main Sep 2, 2026
25 checks passed
@stephen-derosa
stephen-derosa deleted the sderosa/install-retries branch September 2, 2026 02: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.

5 participants