MarshallOfSound

#53470: ci: retry the depot_tools clones and the angle fetch on transient network errors

Merged
Created: Sep 3, 2026, 1:59:33 PM
Merged: Sep 3, 2026, 3:26:44 PM
5 comments
Target: main

Description of Change

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 i -g @electron/build-tools, then the depot_tools clone that the first e command performs (fatal: fetch-pack: invalid index-pack output)
  • Fixup angle git in the fix-sync action, a large git fetch from 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 through RETRY_ATTEMPTS, RETRY_DELAY and RETRY_FACTOR), and prefixes those commands with it. It's a script rather than a composite action so each step stays a plain run: and no command has to pass through an action input. Each wrapped command is safe to repeat: a failed git clone removes its partial directory, and a failed git fetch leaves 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

Backports

42-x-y
Merged
PR Number
#53475
Merged At
Sep 3, 2026, 4:30:00 PM
Released In
v42.11.2
Release Date
Sep 3, 2026, 7:24:13 PM
43-x-y
Merged
PR Number
#53474
Merged At
Sep 3, 2026, 4:51:27 PM
Released In
v43.6.0
Release Date
Sep 3, 2026, 7:24:06 PM
44-x-y
Merged
PR Number
#53473
Merged At
Sep 3, 2026, 4:38:52 PM
Released In
v44.2.0
Release Date
Sep 3, 2026, 7:23:56 PM
45-x-y
Merged
PR Number
#53472
Merged At
Sep 3, 2026, 4:47:27 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron