Skip to content

Commit d5bcc9e

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20210818.12 (#134)
[release/6.0-rc1] Update dependencies from dotnet/arcade
1 parent 05dbba8 commit d5bcc9e

File tree

9 files changed

+59
-27
lines changed

9 files changed

+59
-27
lines changed

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21412.1">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21418.12">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
8+
<Sha>ac8b7514ca8bcac1d071a16b7a92cb52f7058871</Sha>
99
</Dependency>
10-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21412.1">
10+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21418.12">
1111
<Uri>https://github.com/dotnet/arcade</Uri>
12-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
12+
<Sha>ac8b7514ca8bcac1d071a16b7a92cb52f7058871</Sha>
1313
</Dependency>
14-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21412.1">
14+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21418.12">
1515
<Uri>https://github.com/dotnet/arcade</Uri>
16-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
16+
<Sha>ac8b7514ca8bcac1d071a16b7a92cb52f7058871</Sha>
1717
</Dependency>
1818
</ToolsetDependencies>
1919
</Dependencies>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
77
</PropertyGroup>
88
<PropertyGroup>
9-
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21412.1</MicrosoftDotNetBuildTasksPackagingVersion>
9+
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21418.12</MicrosoftDotNetBuildTasksPackagingVersion>
1010
</PropertyGroup>
1111
</Project>

eng/common/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ function InitializeCustomToolset {
187187
}
188188

189189
function Build {
190+
TryLogClientIpAddress
190191
InitializeToolset
191192
InitializeCustomToolset
192193

eng/common/post-build/sourcelink-validation.ps1

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ $global:RepoFiles = @{}
1717
$MaxParallelJobs = 16
1818

1919
$MaxRetries = 5
20+
$RetryWaitTimeInSeconds = 30
2021

2122
# Wait time between check for system load
2223
$SecondsBetweenLoadChecks = 10
@@ -99,9 +100,9 @@ $ValidatePackage = {
99100
$Status = 200
100101
$Cache = $using:RepoFiles
101102

102-
$totalRetries = 0
103+
$attempts = 0
103104

104-
while ($totalRetries -lt $using:MaxRetries) {
105+
while ($attempts -lt $using:MaxRetries) {
105106
if ( !($Cache.ContainsKey($FilePath)) ) {
106107
try {
107108
$Uri = $Link -as [System.URI]
@@ -113,7 +114,7 @@ $ValidatePackage = {
113114
else {
114115
# If it's not a github link, we want to break out of the loop and not retry.
115116
$Status = 0
116-
$totalRetries = $using:MaxRetries
117+
$attempts = $using:MaxRetries
117118
}
118119
}
119120
catch {
@@ -123,9 +124,15 @@ $ValidatePackage = {
123124
}
124125

125126
if ($Status -ne 200) {
126-
$totalRetries++
127+
$attempts++
127128

128-
if ($totalRetries -ge $using:MaxRetries) {
129+
if ($attempts -lt $using:MaxRetries)
130+
{
131+
$attemptsLeft = $using:MaxRetries - $attempts
132+
Write-Warning "Download failed, $attemptsLeft attempts remaining, will retry in $using:RetryWaitTimeInSeconds seconds"
133+
Start-Sleep -Seconds $using:RetryWaitTimeInSeconds
134+
}
135+
else {
129136
if ($NumFailedLinks -eq 0) {
130137
if ($FailedFiles.Value -eq 0) {
131138
Write-Host

eng/common/sdk-task.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ try {
8383
}
8484

8585
if ($restore) {
86+
Try-LogClientIpAddress
8687
Build 'Restore'
8788
}
8889

eng/common/templates/job/source-index-stage1.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,24 @@ jobs:
3434
inputs:
3535
packageType: sdk
3636
version: 3.1.x
37-
38-
- task: UseDotNet@2
39-
displayName: Use .NET Core sdk
40-
inputs:
41-
useGlobalJson: true
37+
installationPath: $(Agent.TempDirectory)/dotnet
38+
workingDirectory: $(Agent.TempDirectory)
4239

4340
- script: |
44-
dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
45-
dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
46-
echo ##vso[task.prependpath]$(Build.SourcesDirectory)/.source-index/tools
41+
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
42+
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
4743
displayName: Download Tools
44+
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
45+
workingDirectory: $(Agent.TempDirectory)
4846
4947
- script: ${{ parameters.sourceIndexBuildCommand }}
5048
displayName: Build Repository
5149

52-
- script: BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
50+
- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
5351
displayName: Process Binlog into indexable sln
54-
env:
55-
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
5652

5753
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
58-
- script: UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
54+
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
5955
displayName: Upload stage1 artifacts to source index
6056
env:
6157
BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url)
62-
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2

eng/common/tools.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
154154
return $global:_DotNetInstallDir
155155
}
156156

157+
# In case of network error, try to log the current IP for reference
158+
Try-LogClientIpAddress
159+
157160
# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
158161
$env:DOTNET_MULTILEVEL_LOOKUP=0
159162

@@ -872,3 +875,21 @@ if (!$disableConfigureToolsetImport) {
872875
}
873876
}
874877
}
878+
879+
function Try-LogClientIpAddress()
880+
{
881+
Write-Host "Attempting to log this client's IP for Azure Package feed telemetry purposes"
882+
try
883+
{
884+
$result = Invoke-WebRequest -Uri "http://co1.msedge.net/fdv2/diagnostics.aspx" -UseBasicParsing
885+
$lines = $result.Content.Split([Environment]::NewLine)
886+
$socketIp = $lines | Select-String -Pattern "^Socket IP:.*"
887+
Write-Host $socketIp
888+
$clientIp = $lines | Select-String -Pattern "^Client IP:.*"
889+
Write-Host $clientIp
890+
}
891+
catch
892+
{
893+
Write-Host "Unable to get this machine's effective IP address for logging: $_"
894+
}
895+
}

eng/common/tools.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,13 @@ function StopProcesses {
399399
return 0
400400
}
401401

402+
function TryLogClientIpAddress () {
403+
echo 'Attempting to log this client''s IP for Azure Package feed telemetry purposes'
404+
if command -v curl > /dev/null; then
405+
curl -s 'http://co1.msedge.net/fdv2/diagnostics.aspx' | grep ' IP: '
406+
fi
407+
}
408+
402409
function MSBuild {
403410
local args=$@
404411
if [[ "$pipelines_log" == true ]]; then

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"dotnet": "6.0.100-rc.1.21379.2"
44
},
55
"msbuild-sdks": {
6-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21412.1",
7-
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21412.1"
6+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21418.12",
7+
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21418.12"
88
}
99
}

0 commit comments

Comments
 (0)