fix(ci): add retry logic for Foundry installation#29255
Conversation
Wrap foundryup install in nick-fields/retry with 3 attempts, 30s wait, and 3min timeout to handle transient network failures that account for ~16% of setup environment CI failures. Add set -euo pipefail to ensure failures propagate correctly. Add on_retry_command to clean up partial or corrupt downloads before each retry attempt.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found All E2E tests pre-selected. |
|
|
✅ E2E Fixture Validation — Schema is up to date |
AI PR Analysis🚫 Merge safe: false | 🟠 Risk: high
AI analysis did not complete. Manual review recommended. |
Closing — superseded by #29191PR #29191 ( Before (what this PR retried):
After (#29191, now on main):
The original failure modes (curl connection reset to INFRA-3580 impact: The Foundry download failure sub-cause (16%, ~10 runs) is now addressed by the architecture change in #29191, not by retry logic. Closing this PR as obsolete. |



Description
Problem: Foundry download failures account for 16% (~10 runs) of the 64 Setup Environment CI failures on
mainover 30 days (Mar 16 – Apr 16, 2026). The failure modes includecurl: (35) Recv failure: Connection reset by peer, corrupt tar archives, and malformed URLs. The current implementation has zero retry logic — a singlecurlorfoundryupfailure kills the entire step.See INFRA-3580 for the full root cause analysis.
Solution:
Wrap the Foundry installation step in
nick-fields/retry(3 attempts, 30s wait, 3min timeout per attempt), matching the existing repo pattern already used for Corepack, Yarn, and CocoaPods in the same file.Key details:
set -euo pipefailat the top of the command block to ensure failures propagate correctly (learned from bugbot review on PR #29236)on_retry_commandcleans up partial/corrupt Foundry downloads (rm -rf $FOUNDRY_DIR) before each retry — addresses the "corrupt tar" failure modetimeout_minutes: 3per attempt — Foundry download + install typically takes secondsGITHUB_PATHmodification (echo "$FOUNDRY_BIN" >> "$GITHUB_PATH") works correctly insidenick-fields/retrysince it's a file-based mechanismenv: FOUNDRY_VERSIONwith inline${{ inputs.foundry-version }}expression sinceuses:steps in composite actions resolve inputs at parse timeChangelog
CHANGELOG entry: null
Related issues
Fixes: INFRA-3580 (partial — addresses Foundry download failure sub-cause)
Manual testing steps
Screenshots/Recordings
N/A — CI workflow changes only, no UI impact.
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk CI-only change that adds retries and cleanup around Foundry installation; main risk is masking persistent install issues or increasing setup time slightly on repeated failures.
Overview
Improves CI resilience by wrapping the
Install Foundrystep in.github/actions/setup-e2e-env/action.ymlwithnick-fields/retry(3 attempts, 30s backoff, 3-minute timeout).Each retry now cleans up the Foundry directory to avoid partial/corrupt installs, and the install command is hardened with
set -euo pipefailwhile directly using${{ inputs.foundry-version }}for the requested version.Reviewed by Cursor Bugbot for commit 959916f. Bugbot is set up for automated code reviews on this repo. Configure here.