Repository navigation
[ci] Retry dotnet-install script downloads with backoff - #13881
Open
simonrozsival wants to merge 1 commit into
Open
simonrozsival wants to merge 1 commit into
simonrozsival wants to merge 1 commit into
Conversation
Context: #12120 A transient empty reply (curl exit 52) from the .NET CDN currently fails SDK provisioning immediately. Retry the installer-script download up to five times, with 2/4/8/16-second backoff, including transport errors unsupported by older curl retry flags. Preserve the final curl exit code and atomic cache rename, and clean up partial downloads on exit. Keep retries local: sourcing Arcade tools initializes unrelated toolset and pipeline state. Validation: bash -n eng/install-dotnet.sh and git diff --check passed. Isolated execution of the full script with mocked curl/sleep passed six scenarios: immediate success, transient exits 35/52/56, success on the final attempt, retry exhaustion and cleanup, cached installer, and installer failure propagation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The installer-download retry change has no active review issues.
No open issues 🎉
What changed in this PR
Improves .NET SDK provisioning resilience by retrying installer-script downloads after transient network failures.
Changes:
- Adds five download attempts with 2/4/8/16-second backoff, compatible with older curl versions.
- Preserves the final curl exit code and atomic cache rename, and cleans up partial downloads on exit.
| File | Description |
|---|---|
eng/install-dotnet.sh |
Adds download retries, failure diagnostics, and temporary-file cleanup. |
Review effort: Balanced
|
Reviewed the installer-download retry. What I checked:
|
This branch has not been deployed
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
0b063316e7f1dc4fb2d77b39499190da1b388603↓ Live CDN download and CI execution were not validated.
↓ The underlying agent-specific network fault remains unverified and is not repaired by retries.
Context: #12120
SDK provisioning intermittently fails before installation with
curl: (52) Empty reply from server. The installer-script download makes a single request, so transient CDN/network failures immediately fail the job.Retry that download up to five times with 2/4/8/16-second backoff. Preserve the final curl exit code and atomic cache rename, and clean up partial downloads on exit. The loop handles transport failures without requiring
--retry-all-errors, which older macOS curl versions lack. Arcade's retry helper is not sourced because its containing script initializes unrelated toolset and pipeline state.Validation:
bash -n eng/install-dotnet.shandgit diff --check origin/main...HEADpassed. An isolatedpython3 -harness executed the full script with mockedcurl/sleep; all six scenarios passed: immediate success, transient exits 35/52/56, success on the final attempt, retry exhaustion with cleanup and exit-status preservation, cached installer, and installer failure propagation. An Opus 5.5 code-review subagent found no actionable issues.No live CDN download, SDK installation, CI run or device tests were performed; validation was isolated to this provisioning-script change.