Repository navigation
feat: make the CLI download more tolerant to short GitHub outages - #15
Merged
Merged
Conversation
- New `download-retry-count` and `download-retry-wait` inputs add extra download rounds on top of the 3 tries made by @actions/tool-cache. Client errors (4xx except 408/429) are not retried. Defaults to no extra round, so existing behavior is unchanged. - The downloaded CLI is stored in the runner tool cache and reused when the exact requested version is already there, so self-hosted runners (or images with a pre-installed CLI) skip the download. Closes #14 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #14
Changes
Download retries
download-retry-count(default0) anddownload-retry-wait(default30seconds).@actions/tool-cachealways makes 3 tries per download and that can't be configured, so each retry is another full round of those 3 tries.Reusing a CLI already on the runner
tc.cacheFile, under the nameontrack-cli).tc.find).5don't use the cache, because the library would treat them as a range.RUNNER_TEMP. The binary is still namedontrack-cli.Testing
@actions/tool-cachewith a local server returning 504 four times, then 200. The download succeeded on the second round, the cached binary kept its executable permissions, and a second run reused the cache.Not covered
versionis empty, the lookup of the latest release through the GitHub API still has no retry.🤖 Generated with Claude Code