Repository navigation
fix: retry the install.sh download on timeouts and server errors - #30
Merged
Conversation
The action downloaded mergify-cli's install.sh from raw.githubusercontent.com in a single try, so one 503 or 504 from GitHub failed the step, and the job with it, although install.sh retries its own downloads. The download now retries the way install.sh does: `curl --retry 8`, which retries timeouts and 408, 429, 500, 502, 503 and 504 answers, the wait doubling from one second (about four minutes of waits). A 10-second connect timeout and a 30-second cap per attempt make a connection or an answer that stalls a retried timeout, where it used to hang until the kernel or the job gave up. `--retry-max-time 300` stops retrying after five minutes, and at once when a Retry-After header asks for a longer wait. A 404 still fails at once. When the retries run out, the step fails naming the URL it could not download, below curl's own error. A 404 on a pinned version says that `mergify_cli_version` is not a mergify-cli release that ships install.sh. The step checks the status code as well as curl's exit code: curl 8.14 exits 0 on an error it does not retry, so a 404 would otherwise reach `sh` as a missing file. Like in install.sh, a refused or reset connection and a TLS error are not retried. Retrying every error (`--retry-all-errors`) would make a mistyped version wait five minutes before failing, and the curl of RHEL 8 (7.61), where mergify-cli runs, does not have it. The new test-install-retry job points raw.githubusercontent.com at 192.0.2.1, an address that never answers, restores it once curl is seen connecting there, and checks that the install succeeds on a later attempt. Nothing is released on merge: release.yaml releases on its own only when the default mergify-cli version changes, so this ships in the release that the next mergify-cli bump cuts. Fixes MRGFY-13647 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: I5e5d02c22cb56bf26e1aebbc375a12f989087ab5
Contributor
Merge Protections🟢 All 6 merge protections satisfied — ready to merge. Show 6 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
sileht
marked this pull request as ready for review
November 27, 2026 12:55
kozlek
approved these changes
Nov 27, 2026
Contributor
✅ Merged into
|
| Step | Time (UTC) | Details |
|---|---|---|
| ✅ Entered the queue | Fri 27 Nov, 13:46 | rule default · triggered by merge protections |
| ✅ Passed | draft #34 | |
| ✅ Merged | 13:49 | 4698b61 · squash |
7 merge conditions met
- ✅
title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:· required by Merge Protections ruleEnforce conventional commit - ✅ any of · required by Merge Protections rule
👀 Review Requirements:- ✅
#approved-reviews-by>=1 author = dependabot[bot]author = mergify-ci-botauthor = renovate[bot]
- ✅
- ✅
body ~= (?ms:.{48,})· required by Merge Protections rule📕 PR description - ✅
#changes-requested-reviews-by = 0· required by Merge Protections rule🔎 Reviews - ✅
#review-requested = 0· required by Merge Protections rule🔎 Reviews - ✅
#review-threads-unresolved = 0· required by Merge Protections rule🔎 Reviews - ✅
check-success=all-greens· required by Merge Protections rule🤖 Continuous Integration
Closed
29 of 35 tasks
mergify
Bot
deleted the
devs/sileht/mrgfy-13647-setup-cli-install-retry/retry-install-sh-download-timeouts-server-errors--5e5d02c2
branch
November 27, 2026 13:49
This branch was successfully deployed
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.
The action downloaded mergify-cli's install.sh from raw.githubusercontent.com
in a single try, so one 503 or 504 from GitHub failed the step, and the job
with it, although install.sh retries its own downloads.
The download now retries the way install.sh does:
curl --retry 8, whichretries timeouts and 408, 429, 500, 502, 503 and 504 answers, the wait
doubling from one second (about four minutes of waits). A 10-second connect
timeout and a 30-second cap per attempt make a connection or an answer that
stalls a retried timeout, where it used to hang until the kernel or the job
gave up.
--retry-max-time 300stops retrying after five minutes, and at oncewhen a Retry-After header asks for a longer wait. A 404 still fails at once.
When the retries run out, the step fails naming the URL it could not
download, below curl's own error. A 404 on a pinned version says that
mergify_cli_versionis not a mergify-cli release that ships install.sh. Thestep checks the status code as well as curl's exit code: curl 8.14 exits 0 on
an error it does not retry, so a 404 would otherwise reach
shas a missingfile.
Like in install.sh, a refused or reset connection and a TLS error are not
retried. Retrying every error (
--retry-all-errors) would make a mistypedversion wait five minutes before failing, and the curl of RHEL 8 (7.61),
where mergify-cli runs, does not have it.
The new test-install-retry job points raw.githubusercontent.com at 192.0.2.1,
an address that never answers, restores it once curl is seen connecting
there, and checks that the install succeeds on a later attempt.
Nothing is released on merge: release.yaml releases on its own only when the
default mergify-cli version changes, so this ships in the release that the
next mergify-cli bump cuts.
Fixes MRGFY-13647
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com