Skip to content

improve(github-cli): retry gh extension install before falling back to git clone - #1732

Open
Ryosuke Hiroe (rhiroe) wants to merge 1 commit into
devcontainers:mainfrom
rhiroe:github-cli/improve/gh-extension-install-retry
Open

improve(github-cli): retry gh extension install before falling back to git clone#1732
Ryosuke Hiroe (rhiroe) wants to merge 1 commit into
devcontainers:mainfrom
rhiroe:github-cli/improve/gh-extension-install-retry

Conversation

@rhiroe

@rhiroe Ryosuke Hiroe (rhiroe) commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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.

@rhiroe
Ryosuke Hiroe (rhiroe) requested a review from a team as a code owner September 9, 2026 03:39
@rhiroe
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.
@rhiroe
Ryosuke Hiroe (rhiroe) force-pushed the github-cli/improve/gh-extension-install-retry branch from 2680c54 to e12403b Compare September 9, 2026 04:02
@rhiroe
Ryosuke Hiroe (rhiroe) marked this pull request as ready for review September 9, 2026 04:03
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