From 6dce76644dd154ca53809f86c69b4de03a563023 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 30 Aug 2021 17:07:40 -0700 Subject: [PATCH 1/4] Update to an SDK that understands NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY, and set some values in eng/common Job template. --- eng/common/templates/job/job.yml | 10 ++++++++++ global.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 37dceb1bab0..729b936948b 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -62,6 +62,16 @@ jobs: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} variables: + + # These values enable longer delays, configurable number of retries, and special understanding of TCP hang-up + # See https://github.com/NuGet/Home/issues/11027 for details + - name: NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY + value: true + - name: NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT + value: 6 + - name: NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS + value: 1000 + - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' diff --git a/global.json b/global.json index aefc817aafd..48ed24b673e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.100-rc.1.21379.2" + "dotnet": "6.0.100-rc.1.21430.12" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21427.6", From fd58003dcea7d0f6c8b0d88ecd1aa3fd0c480dda Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 31 Aug 2021 10:28:05 -0700 Subject: [PATCH 2/4] Try to work around "The target framework 'netcoreapp2.1' is out of support and will not receive security updates in the future." --- eng/common/tools.ps1 | 2 ++ eng/common/tools.sh | 2 ++ .../Microsoft.DotNet.ArcadeLogging.csproj | 2 +- .../src/build/Packaging.targets | 4 ++++ .../src/Microsoft.DotNet.RemoteExecutor.csproj | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 56ee4a577ac..fa142ff2f67 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -717,6 +717,8 @@ function MSBuild() { (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')), (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')), (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll')) + (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')), + (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll')) ) $selectedPath = $null foreach ($path in $possiblePaths) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 41e323104df..1e82c6c756a 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -427,6 +427,8 @@ function MSBuild { possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" ) + possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" ) + possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" ) for path in "${possiblePaths[@]}"; do if [[ -f $path ]]; then selectedPath=$path diff --git a/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj b/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj index afc8eed15ca..ec8a9408772 100644 --- a/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj +++ b/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 true diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets index ccdfb455ffa..8d8af6a664d 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets +++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets @@ -929,6 +929,10 @@ @(NETCoreApp30RIDs) + + + @(NETCoreApp31RIDs) + @(NETCoreApp50RIDs) diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj index 24b5c5f1caf..8da0c48f81d 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj @@ -4,7 +4,7 @@ Exe - netcoreapp2.1;net461 + netcoreapp3.1;net461 This package provides support for running tests out-of-process. true true From 563d664a70b490c887f79d45483136e2056751db Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 31 Aug 2021 10:56:29 -0700 Subject: [PATCH 3/4] Move logging back to netstandard2.0 --- .../Microsoft.DotNet.ArcadeLogging.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj b/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj index ec8a9408772..afc8eed15ca 100644 --- a/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj +++ b/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + netstandard2.0 true From d0a6890a555dd2652937b81635716d10f7d56145 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 31 Aug 2021 12:00:29 -0700 Subject: [PATCH 4/4] PR feedbacks: Only set variables in tools.ps1/sh where we set other nuget variables --- eng/common/templates/job/job.yml | 10 ---------- eng/common/tools.ps1 | 9 +++++++++ eng/common/tools.sh | 7 +++++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 729b936948b..37dceb1bab0 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -62,16 +62,6 @@ jobs: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} variables: - - # These values enable longer delays, configurable number of retries, and special understanding of TCP hang-up - # See https://github.com/NuGet/Home/issues/11027 for details - - name: NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY - value: true - - name: NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT - value: 6 - - name: NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS - value: 1000 - - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index fa142ff2f67..02347914f5d 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -709,6 +709,15 @@ function MSBuild() { Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20' } + if ($ci) { + $env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true' + $env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6 + $env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000 + Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true' + Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6' + Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000' + } + $toolsetBuildProject = InitializeToolset $basePath = Split-Path -parent $toolsetBuildProject $possiblePaths = @( diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 1e82c6c756a..6a4871ef72b 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -417,6 +417,13 @@ function MSBuild { export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" + + export NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY=true + export NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT=6 + export NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS=1000 + Write-PipelineSetVariable -name "NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY" -value "true" + Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT" -value "6" + Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS" -value "1000" fi local toolset_dir="${_InitializeToolset%/*}"