improve(github-cli): retry gh extension install before falling back to git clone - #1732
Open
Ryosuke Hiroe (rhiroe) wants to merge 1 commit into
Open
Conversation
Ryosuke Hiroe (rhiroe)
marked this pull request as draft
September 9, 2026 03:43
…o git clone gh extension install failures fell through silently to the git-clone fallback. Retry it up to 3 times with backoff before falling back, since failures are most often transient (network/API rate limiting) rather than the extension being fundamentally unusable, and log each failed attempt's exit code so provisioning logs show why the fallback was hit. Extensions that require a build step (e.g. github/gh-stack) are not usable after a plain git clone. Improving the fallback itself (e.g. downloading a prebuilt release binary) would add significant logic and ongoing maintenance cost, so that path is not pursued here; instead, after cloning, check for the expected gh-<name> executable and exit 1 if it's missing, so a build-requiring extension fails provisioning loudly instead of leaving a broken extension in place.
Ryosuke Hiroe (rhiroe)
force-pushed
the
github-cli/improve/gh-extension-install-retry
branch
from
September 9, 2026 04:02
2680c54 to
e12403b
Compare
Ryosuke Hiroe (rhiroe)
marked this pull request as ready for review
September 9, 2026 04:03
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.
gh extension install failures fell through silently to the git-clone fallback. Retry it up to 3 times with backoff before falling back, since failures are most often transient (network/API rate limiting) rather than the extension being fundamentally unusable, and log each failed attempt's exit code so provisioning logs show why the fallback was hit.
Extensions that require a build step (e.g. github/gh-stack) are not usable after a plain git clone. Improving the fallback itself (e.g. downloading a prebuilt release binary) would add significant logic and ongoing maintenance cost, so that path is not pursued here; instead, after cloning, check for the expected gh- executable and exit 1 if it's missing, so a build-requiring extension fails provisioning loudly instead of leaving a broken extension in place.