checkout/src
Jason Barnett b6a00b350f Add retry logic to checkout and submoduleUpdate for partial clone resilience
When using partial clones (filter=blob:none, which is automatically set
for sparse checkouts), `git checkout` lazily fetches missing blobs from
the promisor remote. If the remote is temporarily unavailable, this
network call fails and surfaces as a hard error with no retry.

The `fetch`, `getDefaultBranch`, and `lfsFetch` methods already use
retryHelper, but `checkout` and `submoduleUpdate` did not, despite both
performing network operations:

- `checkout`: fetches blobs on-demand from promisor remotes during
  partial clone checkouts
- `submoduleUpdate`: clones/fetches submodule repositories

This was observed in production when GitHub's git service had a brief
outage, causing the checkout step to fail with:

  fatal: unable to access '...': Failed to connect to github.com port
  443 after 135272 ms: Couldn't connect to server
  fatal: could not fetch <sha> from promisor remote

Wrapping both methods with the existing retryHelper (3 attempts with
10-20s jittered backoff) makes these operations resilient to transient
network failures, consistent with how fetch already behaves.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:52:56 +00:00
..
misc Update all references from v5 and v4 to v6 (#2314) 2025-11-23 19:32:55 -06:00
fs-helper.ts Update NPM dependencies (#1703) 2024-04-24 12:04:10 -04:00
git-auth-helper.ts Add worktree support for persist-credentials includeIf (#2327) 2025-12-01 19:53:23 -06:00
git-command-manager.ts Add retry logic to checkout and submoduleUpdate for partial clone resilience 2026-03-20 16:52:56 +00:00
git-directory-helper.ts Fix typos found by codespell (#1287) 2023-04-19 16:55:10 +02:00
git-source-provider.ts Fix tag handling: preserve annotations and explicit fetch-tags (#2356) 2026-01-09 13:42:23 -06:00
git-source-settings.ts Add SSH user parameter (#1685) 2024-04-18 15:29:55 -04:00
git-version.ts Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
github-api-helper.ts Check platform for extension (#1732) 2024-05-16 13:40:36 -04:00
input-helper.ts Update NPM dependencies (#1703) 2024-04-24 12:04:10 -04:00
main.ts Add Ref and Commit outputs (#1180) 2024-09-05 11:57:13 -04:00
ref-helper.ts Fix tag handling: preserve annotations and explicit fetch-tags (#2356) 2026-01-09 13:42:23 -06:00
regexp-helper.ts add support for submodules (#173) 2020-03-05 14:21:59 -05:00
retry-helper.ts update dev dependencies and react to new linting rules (#611) 2021-10-19 09:52:57 -05:00
state-helper.ts Fix comment typos (that got added in #770) (#1057) 2022-12-28 17:19:08 -05:00
url-helper.ts url-helper.ts now leverages well-known environment variables. (#1941) 2024-10-18 10:07:17 +02:00
workflow-context-helper.ts Update NPM dependencies (#1703) 2024-04-24 12:04:10 -04:00