Skip to content

Commit 3c089fa

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20210820.4 (#35609)
[main] Update dependencies from dotnet/arcade
1 parent 60acf4c commit 3c089fa

File tree

11 files changed

+69
-33
lines changed

11 files changed

+69
-33
lines changed

eng/Version.Details.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,22 +296,22 @@
296296
<Uri>https://github.com/dotnet/runtime</Uri>
297297
<Sha>59b6c36b35553a63e4bf1178922ff97d90540220</Sha>
298298
</Dependency>
299-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21412.1">
299+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21420.4">
300300
<Uri>https://github.com/dotnet/arcade</Uri>
301-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
301+
<Sha>fe787bd48ed72e51a98eb5e4e5e5af74edb531e5</Sha>
302302
<SourceBuild RepoName="arcade" ManagedOnly="true" />
303303
</Dependency>
304-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21412.1">
304+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21420.4">
305305
<Uri>https://github.com/dotnet/arcade</Uri>
306-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
306+
<Sha>fe787bd48ed72e51a98eb5e4e5e5af74edb531e5</Sha>
307307
</Dependency>
308-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21412.1">
308+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21420.4">
309309
<Uri>https://github.com/dotnet/arcade</Uri>
310-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
310+
<Sha>fe787bd48ed72e51a98eb5e4e5e5af74edb531e5</Sha>
311311
</Dependency>
312-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21412.1">
312+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21420.4">
313313
<Uri>https://github.com/dotnet/arcade</Uri>
314-
<Sha>58ac7035021bd7277ef7582338afd25403fc9aea</Sha>
314+
<Sha>fe787bd48ed72e51a98eb5e4e5e5af74edb531e5</Sha>
315315
</Dependency>
316316
</ToolsetDependencies>
317317
</Dependencies>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@
138138
<MicrosoftEntityFrameworkCoreVersion>7.0.0-alpha.1.21419.9</MicrosoftEntityFrameworkCoreVersion>
139139
<MicrosoftEntityFrameworkCoreDesignVersion>7.0.0-alpha.1.21419.9</MicrosoftEntityFrameworkCoreDesignVersion>
140140
<!-- Packages from dotnet/arcade -->
141-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21412.1</MicrosoftDotNetBuildTasksInstallersVersion>
142-
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21412.1</MicrosoftDotNetBuildTasksTemplatingVersion>
141+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21420.4</MicrosoftDotNetBuildTasksInstallersVersion>
142+
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21420.4</MicrosoftDotNetBuildTasksTemplatingVersion>
143143
</PropertyGroup>
144144
<!--
145145

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/init-tools-native.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ force=false
1010
download_retries=5
1111
retry_wait_time_seconds=30
1212
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
13-
declare -A native_assets
13+
declare -a native_assets
1414

1515
. $scriptroot/pipeline-logging-functions.sh
1616
. $scriptroot/native/common-library.sh

eng/common/native/common-library.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,12 @@ function NewScriptShim {
148148
fi
149149

150150
if [[ ! -f $tool_file_path ]]; then
151-
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
152-
return 1
151+
# try to see if the path is lower cased
152+
tool_file_path="$(echo $tool_file_path | tr "[:upper:]" "[:lower:]")"
153+
if [[ ! -f $tool_file_path ]]; then
154+
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
155+
return 1
156+
fi
153157
fi
154158

155159
local shim_contents=$'#!/usr/bin/env bash\n'

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

0 commit comments

Comments
 (0)