Skip to content

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

Merged
MarshallOfSound merged 1 commit into
44-x-yfrom
trop/44-x-y-bp-ci-retry-the-depot_tools-clones-and-the-angle-fetch-on-transient-network-errors-1788467213677
Sep 3, 2026
Merged

MarshallOfSound merged 1 commit into
44-x-yfrom
trop/44-x-y-bp-ci-retry-the-depot_tools-clones-and-the-angle-fetch-on-transient-network-errors-1788467213677

Conversation

@trop

@trop trop Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backport of #53470

See that PR for details.

Notes: none

…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.

Co-authored-by: Samuel Attard <[email protected]>
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 3, 2026 20:30
@MarshallOfSound
MarshallOfSound merged commit fef76a6 into 44-x-y Sep 3, 2026
92 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/44-x-y-bp-ci-retry-the-depot_tools-clones-and-the-angle-fetch-on-transient-network-errors-1788467213677 branch September 3, 2026 21:38
@release-clerk

release-clerk Bot commented Sep 3, 2026

Copy link
Copy Markdown

No Release Notes

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant