-
Notifications
You must be signed in to change notification settings - Fork 38
Retry LK CLI installs in CI #248
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,18 +366,38 @@ jobs: | |
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euxo pipefail | ||
| # Change these to change the retry count and delay across all OS entries | ||
| retry_count=3 | ||
| retry_delay_seconds=3 | ||
| if [[ "$RUNNER_OS" == "Linux" ]]; then | ||
| curl -sSL https://get.livekit.io/cli | bash | ||
| curl -sSL --retry "$retry_count" --retry-delay "$retry_delay_seconds" https://get.livekit.io/cli | bash | ||
| elif [[ "$RUNNER_OS" == "macOS" ]]; then | ||
| brew install livekit-cli | ||
| for attempt in $(seq 0 "$retry_count"); do | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. brew already tried to install 3 times, so i dont think we need this chunk |
||
| if brew install livekit-cli; then | ||
| break | ||
| fi | ||
| if [[ "$attempt" == "$retry_count" ]]; then | ||
| exit 1 | ||
| fi | ||
| sleep "$retry_delay_seconds" | ||
| done | ||
| elif [[ "$RUNNER_OS" == "Windows" ]]; then | ||
| install_dir="$RUNNER_TEMP/livekit-cli" | ||
| mkdir -p "$install_dir" | ||
| tag="$(gh api repos/livekit/livekit-cli/releases/latest --jq '.tag_name')" | ||
| gh release download "$tag" \ | ||
| --repo livekit/livekit-cli \ | ||
| --pattern "*_windows_amd64.zip" \ | ||
| --output "$RUNNER_TEMP/lk.zip" | ||
| for attempt in $(seq 0 "$retry_count"); do | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why arent we using winget here? |
||
| if tag="$(gh api repos/livekit/livekit-cli/releases/latest --jq '.tag_name')" && \ | ||
| gh release download "$tag" \ | ||
| --repo livekit/livekit-cli \ | ||
| --pattern "*_windows_amd64.zip" \ | ||
| --output "$RUNNER_TEMP/lk.zip"; then | ||
| break | ||
| fi | ||
| if [[ "$attempt" == "$retry_count" ]]; then | ||
| exit 1 | ||
| fi | ||
| rm -f "$RUNNER_TEMP/lk.zip" | ||
| sleep "$retry_delay_seconds" | ||
| done | ||
| unzip -o "$RUNNER_TEMP/lk.zip" -d "$install_dir" | ||
| # GITHUB_PATH updates apply to subsequent steps only; export PATH here | ||
| # so lk --version in this step succeeds. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Linux installation failures remain unretried
On Linux,
curl --retryretries only the installer-script download, while any failure inside the downloaded installer ends the job immediately.Was this helpful? React with 👍 or 👎 to provide feedback.