Repository navigation
Conversation
The RestoreRepoTools target calls dotnet tool restore with no retry logic. When macOS agents hit transient network errors like Connection reset by peer, the entire build fails. This adds a single retry with a warning message, matching the pattern used elsewhere in arcade for network-sensitive operations. Co-authored-by: Copilot <[email protected]>
|
Build https://dev.azure.com/dnceng/internal/_build/results?buildId=2928853 was for npm so is not related to "dotnet tool restore". NuGet already does retry. There's NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT and NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS which influence this which you can set instead. I think I'd prefer waiting to see if we get more reports before going this route. I also think raising the warning would fail the build if we have warnings-as-errors |
For the VMR, I think we need to be more aggressive with retries. I'll monitor further, but my bar is pretty low. |
Summary
The
RestoreRepoToolstarget inTools.projcallsdotnet tool restorewith no retry logic. When macOS agents hit transient network errors likeConnection reset by peer, the entire build fails with no chance of recovery.This adds a single retry with a warning message, using the standard MSBuild
IgnoreExitCode+ conditional re-execution pattern.Observed Failures
Connection reset by peerduringdotnet tool restoreon MacCatalyst_Shortstack_arm64 — failed the entire main buildWhat Changed
The
<Exec>fordotnet tool restoreis wrapped withIgnoreExitCode="true"+<Output>to capture the exit code, then conditionally re-executed if the first attempt failed, with a warning message emitted for diagnostics.Arcade already has retry infrastructure (
ExecWithRetriestask,with_retriesshell function) but those aren't available in this MSBuild context. The inline pattern is minimal and self-contained./cc @dotnet/product-construction