Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] Update dependencies from dotnet/arcade #51334

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.21116.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.21118.7">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1c06c541c2dc6edb3d652cb092785eb341ef8331</Sha>
<Sha>4957a6f3dd5f6fd1ca9ff06f9c50402f2e3b17e8</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.10.0-1.21113.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>69f354dd21df8dac374c35169bdabb9000cfdea3</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.21116.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.21118.7">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1c06c541c2dc6edb3d652cb092785eb341ef8331</Sha>
<Sha>4957a6f3dd5f6fd1ca9ff06f9c50402f2e3b17e8</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
43 changes: 37 additions & 6 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,28 @@ function InstallDotNet {
}
}

function with_retries {
local maxRetries=5
local retries=1
echo "Trying to run '$@' for maximum of $maxRetries attempts."
while [[ $((retries++)) -le $maxRetries ]]; do
"$@"

if [[ $? == 0 ]]; then
echo "Ran '$@' successfully."
return 0
fi

timeout=$((3**$retries-1))
echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
sleep $timeout
done

echo "Failed to execute '$@' for $maxRetries times." 1>&2

return 1
}

function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
Expand All @@ -246,13 +268,22 @@ function GetDotNetInstallScript {

# Use curl if available, otherwise use wget
if command -v curl > /dev/null; then
# first, try directly, if this fails we will retry with verbose logging
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
if command -v openssl &> /dev/null
then
echo "Curl failed; dumping some information about dotnet.microsoft.com for later investigation"
echo | openssl s_client -showcerts -servername dotnet.microsoft.com -connect dotnet.microsoft.com:443
fi
echo "Will now retry the same URL with verbose logging."
with_retries curl "$install_script_url" -sSL --verbose --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
else
wget -q -O "$install_script" "$install_script_url" || {
else
with_retries wget -v -O "$install_script" "$install_script_url" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
Expand All @@ -267,7 +298,7 @@ function InitializeBuildTool {
if [[ -n "${_InitializeBuildTool:-}" ]]; then
return
fi

InitializeDotNetCli $restore

# return values
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"xcopy-msbuild": "16.8.0-preview2.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.21116.3",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.21116.3"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.21118.7",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.21118.7"
}
}