Repository navigation
ci: retry the depot_tools clones and the angle fetch on transient network errors - #53470
Merged
Merged
Conversation
…work errors Three CI steps fetch over the network with no retry, and each has failed builds on main with errors that pass on a re-run: - the test job's "Get Depot Tools" clone from googlesource.com - "Install Build Tools" (npm install, then the depot_tools clone that the first `e` command does): "fetch-pack: invalid index-pack output" - "Fixup angle git" in fix-sync, a large `git fetch` from github.com: "RPC failed; curl 56 Recv failure: Operation timed out" Add script/actions/retry.sh, which reruns a command with exponential backoff (4 attempts, waiting 1s, 4s and 16s), and use it for those commands. Each one is safe to repeat: a failed clone removes its partial directory, and a failed fetch leaves the repository unchanged.
VerteDinde
approved these changes
Sep 3, 2026
|
No Release Notes |
This was referenced Sep 3, 2026
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #53472 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #53473 |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #53474 |
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #53475 |
claude Bot
pushed a commit
that referenced
this pull request
Sep 3, 2026
…atches-merge-driver Resolve the adjacent-line conflict in .github/actions/install-build-tools/action.yml: keep BUILD_TOOLS_SHA=6bd58bb51aedf9029ed495e79b32dcbf63c181da from this branch and take the retry.sh wrapping from main (#53470). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01FjcRsjpBz7eMoAAxSxtBrU
2 of 3 tasks
MarshallOfSound
pushed a commit
that referenced
this pull request
Sep 3, 2026
script/actions/retry.sh (#53470, backported in #53473) assumed that a failed `git clone` removes its directory, so it rerun the command as is. That is only true while git is still fetching the pack: once the repository has been written, a failure in the checkout stage keeps the directory, and with --filter=tree:0 the checkout still fetches trees over the network. In the 44-x-y run for #53479, the "Get Depot Tools" step lost DNS mid-clone ("fatal: could not fetch ... from promisor remote"), left ./depot_tools behind, and every retry then failed with "fatal: destination path 'depot_tools' already exists and is not an empty directory", so the wrapper turned one transient error into a guaranteed failure. Add an opt-in RETRY_CLEAN_PATH to retry.sh: when set, the path is removed before each retry, never before the first attempt, and set it to depot_tools at the clone call site. The other callers (npm install, `e d update_depot_tools`, `git fetch`) are unchanged. Claude-Session: https://claude.ai/code/session_01Pgo4hKUF1UNQCWyBFwRdjg Co-authored-by: Claude <[email protected]>
MarshallOfSound
pushed a commit
that referenced
this pull request
Sep 4, 2026
script/actions/retry.sh (#53470, backported in #53473) assumed that a failed `git clone` removes its directory, so it rerun the command as is. That is only true while git is still fetching the pack: once the repository has been written, a failure in the checkout stage keeps the directory, and with --filter=tree:0 the checkout still fetches trees over the network. In the 44-x-y run for #53479, the "Get Depot Tools" step lost DNS mid-clone ("fatal: could not fetch ... from promisor remote"), left ./depot_tools behind, and every retry then failed with "fatal: destination path 'depot_tools' already exists and is not an empty directory", so the wrapper turned one transient error into a guaranteed failure. Add an opt-in RETRY_CLEAN_PATH to retry.sh: when set, the path is removed before each retry, never before the first attempt, and set it to depot_tools at the clone call site. The other callers (npm install, `e d update_depot_tools`, `git fetch`) are unchanged. Claude-Session: https://claude.ai/code/session_01Pgo4hKUF1UNQCWyBFwRdjg Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]>
MarshallOfSound
pushed a commit
that referenced
this pull request
Sep 4, 2026
script/actions/retry.sh (#53470, backported in #53473) assumed that a failed `git clone` removes its directory, so it rerun the command as is. That is only true while git is still fetching the pack: once the repository has been written, a failure in the checkout stage keeps the directory, and with --filter=tree:0 the checkout still fetches trees over the network. In the 44-x-y run for #53479, the "Get Depot Tools" step lost DNS mid-clone ("fatal: could not fetch ... from promisor remote"), left ./depot_tools behind, and every retry then failed with "fatal: destination path 'depot_tools' already exists and is not an empty directory", so the wrapper turned one transient error into a guaranteed failure. Add an opt-in RETRY_CLEAN_PATH to retry.sh: when set, the path is removed before each retry, never before the first attempt, and set it to depot_tools at the clone call site. The other callers (npm install, `e d update_depot_tools`, `git fetch`) are unchanged. Claude-Session: https://claude.ai/code/session_01Pgo4hKUF1UNQCWyBFwRdjg Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]>
MarshallOfSound
pushed a commit
that referenced
this pull request
Sep 4, 2026
script/actions/retry.sh (#53470, backported in #53473) assumed that a failed `git clone` removes its directory, so it rerun the command as is. That is only true while git is still fetching the pack: once the repository has been written, a failure in the checkout stage keeps the directory, and with --filter=tree:0 the checkout still fetches trees over the network. In the 44-x-y run for #53479, the "Get Depot Tools" step lost DNS mid-clone ("fatal: could not fetch ... from promisor remote"), left ./depot_tools behind, and every retry then failed with "fatal: destination path 'depot_tools' already exists and is not an empty directory", so the wrapper turned one transient error into a guaranteed failure. Add an opt-in RETRY_CLEAN_PATH to retry.sh: when set, the path is removed before each retry, never before the first attempt, and set it to depot_tools at the clone call site. The other callers (npm install, `e d update_depot_tools`, `git fetch`) are unchanged. Claude-Session: https://claude.ai/code/session_01Pgo4hKUF1UNQCWyBFwRdjg Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]>
MarshallOfSound
pushed a commit
that referenced
this pull request
Sep 4, 2026
script/actions/retry.sh (#53470, backported in #53473) assumed that a failed `git clone` removes its directory, so it rerun the command as is. That is only true while git is still fetching the pack: once the repository has been written, a failure in the checkout stage keeps the directory, and with --filter=tree:0 the checkout still fetches trees over the network. In the 44-x-y run for #53479, the "Get Depot Tools" step lost DNS mid-clone ("fatal: could not fetch ... from promisor remote"), left ./depot_tools behind, and every retry then failed with "fatal: destination path 'depot_tools' already exists and is not an empty directory", so the wrapper turned one transient error into a guaranteed failure. Add an opt-in RETRY_CLEAN_PATH to retry.sh: when set, the path is removed before each retry, never before the first attempt, and set it to depot_tools at the clone call site. The other callers (npm install, `e d update_depot_tools`, `git fetch`) are unchanged. Claude-Session: https://claude.ai/code/session_01Pgo4hKUF1UNQCWyBFwRdjg Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]>
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.
Description of Change
Three CI steps fetch over the network with no retry, and each has failed builds on
mainwith errors that pass on a re-run:npm i -g @electron/build-tools, then the depot_tools clone that the firstecommand performs (fatal: fetch-pack: invalid index-pack output)git fetchfrom github.com (error: RPC failed; curl 56 Recv failure: Operation timed out, e.g. https://github.com/electron/electron/actions/runs/33782849304/job/100741729272)This adds
script/actions/retry.sh, which reruns a command with exponential backoff (4 attempts, waiting 1s, 4s and 16s; tunable throughRETRY_ATTEMPTS,RETRY_DELAYandRETRY_FACTOR), and prefixes those commands with it. It's a script rather than a composite action so each step stays a plainrun:and no command has to pass through an action input. Each wrapped command is safe to repeat: a failedgit cloneremoves its partial directory, and a failedgit fetchleaves the repository as it was. A retry shows up as a warning annotation; after the last attempt the step fails with the command's own exit code, as it does today.The depot_tools clone inside build-tools itself gets the same treatment in electron/build-tools#895, which CI picks up on its next release because this action installs the latest build-tools.
Checklist
Release Notes
Notes: none