Skip to content

Commit 1c65e4c

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20210514.2 (#32764)
[main] Update dependencies from dotnet/arcade
1 parent 3625803 commit 1c65e4c

File tree

6 files changed

+75
-46
lines changed

6 files changed

+75
-46
lines changed

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -300,18 +300,18 @@
300300
<Uri>https://github.com/dotnet/runtime</Uri>
301301
<Sha>f64f12aa83d9f2253eab10551b716d2ba09371d2</Sha>
302302
</Dependency>
303-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21261.2">
303+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21264.2">
304304
<Uri>https://github.com/dotnet/arcade</Uri>
305-
<Sha>1c6a2d9bb8d111720e69b133bf630a38bb136509</Sha>
305+
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
306306
<SourceBuild RepoName="arcade" ManagedOnly="true" />
307307
</Dependency>
308-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21261.2">
308+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21264.2">
309309
<Uri>https://github.com/dotnet/arcade</Uri>
310-
<Sha>1c6a2d9bb8d111720e69b133bf630a38bb136509</Sha>
310+
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
311311
</Dependency>
312-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21261.2">
312+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21264.2">
313313
<Uri>https://github.com/dotnet/arcade</Uri>
314-
<Sha>1c6a2d9bb8d111720e69b133bf630a38bb136509</Sha>
314+
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
315315
</Dependency>
316316
</ToolsetDependencies>
317317
</Dependencies>

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
<MicrosoftEntityFrameworkCoreVersion>6.0.0-preview.5.21267.2</MicrosoftEntityFrameworkCoreVersion>
140140
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-preview.5.21267.2</MicrosoftEntityFrameworkCoreDesignVersion>
141141
<!-- Packages from dotnet/arcade -->
142-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21261.2</MicrosoftDotNetBuildTasksInstallersVersion>
142+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21264.2</MicrosoftDotNetBuildTasksInstallersVersion>
143143
</PropertyGroup>
144144
<!--
145145

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

+52-26
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ $global:RepoFiles = @{}
1616
# Maximum number of jobs to run in parallel
1717
$MaxParallelJobs = 16
1818

19+
$MaxRetries = 5
20+
1921
# Wait time between check for system load
2022
$SecondsBetweenLoadChecks = 10
2123

@@ -29,7 +31,10 @@ $ValidatePackage = {
2931
# Ensure input file exist
3032
if (!(Test-Path $PackagePath)) {
3133
Write-Host "Input file does not exist: $PackagePath"
32-
return 1
34+
return [pscustomobject]@{
35+
result = 1
36+
packagePath = $PackagePath
37+
}
3338
}
3439

3540
# Extensions for which we'll look for SourceLink information
@@ -59,7 +64,10 @@ $ValidatePackage = {
5964

6065
# We ignore resource DLLs
6166
if ($FileName.EndsWith('.resources.dll')) {
62-
return
67+
return [pscustomobject]@{
68+
result = 0
69+
packagePath = $PackagePath
70+
}
6371
}
6472

6573
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
@@ -91,36 +99,49 @@ $ValidatePackage = {
9199
$Status = 200
92100
$Cache = $using:RepoFiles
93101

94-
if ( !($Cache.ContainsKey($FilePath)) ) {
95-
try {
96-
$Uri = $Link -as [System.URI]
97-
98-
# Only GitHub links are valid
99-
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
100-
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
102+
$totalRetries = 0
103+
104+
while ($totalRetries -lt $using:MaxRetries) {
105+
if ( !($Cache.ContainsKey($FilePath)) ) {
106+
try {
107+
$Uri = $Link -as [System.URI]
108+
109+
# Only GitHub links are valid
110+
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
111+
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
112+
}
113+
else {
114+
# If it's not a github link, we want to break out of the loop and not retry.
115+
$Status = 0
116+
$totalRetries = $using:MaxRetries
117+
}
101118
}
102-
else {
119+
catch {
120+
Write-Host $_
103121
$Status = 0
104122
}
105123
}
106-
catch {
107-
write-host $_
108-
$Status = 0
109-
}
110-
}
111124

112-
if ($Status -ne 200) {
113-
if ($NumFailedLinks -eq 0) {
114-
if ($FailedFiles.Value -eq 0) {
115-
Write-Host
125+
if ($Status -ne 200) {
126+
$totalRetries++
127+
128+
if ($totalRetries -ge $using:MaxRetries) {
129+
if ($NumFailedLinks -eq 0) {
130+
if ($FailedFiles.Value -eq 0) {
131+
Write-Host
132+
}
133+
134+
Write-Host "`tFile $RealPath has broken links:"
135+
}
136+
137+
Write-Host "`t`tFailed to retrieve $Link"
138+
139+
$NumFailedLinks++
116140
}
117-
118-
Write-Host "`tFile $RealPath has broken links:"
119141
}
120-
121-
Write-Host "`t`tFailed to retrieve $Link"
122-
123-
$NumFailedLinks++
142+
else {
143+
break
144+
}
124145
}
125146
}
126147
}
@@ -136,7 +157,7 @@ $ValidatePackage = {
136157
}
137158
}
138159
catch {
139-
160+
Write-Host $_
140161
}
141162
finally {
142163
$zip.Dispose()
@@ -220,6 +241,7 @@ function ValidateSourceLinkLinks {
220241
# Process each NuGet package in parallel
221242
Get-ChildItem "$InputPath\*.symbols.nupkg" |
222243
ForEach-Object {
244+
Write-Host "Starting $($_.FullName)"
223245
Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null
224246
$NumJobs = @(Get-Job -State 'Running').Count
225247

@@ -267,6 +289,10 @@ function InstallSourcelinkCli {
267289
try {
268290
InstallSourcelinkCli
269291

292+
foreach ($Job in @(Get-Job)) {
293+
Remove-Job -Id $Job.Id
294+
}
295+
270296
ValidateSourceLinkLinks
271297
}
272298
catch {

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

+12-9
Original file line numberDiff line numberDiff line change
@@ -133,27 +133,27 @@ $CountMissingSymbols = {
133133
elseif (Test-Path $SymbolPath) {
134134
return 'Module'
135135
}
136-
elseif ($output.Contains("503 Service Unavailable")) {
137-
# If we got a 503 error, we should retry.
136+
else
137+
{
138138
$totalRetries++
139139
}
140-
else {
141-
return $null
142-
}
143140
}
144141

145142
return $null
146143
}
147144

145+
$FileGuid = New-Guid
146+
$ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid
147+
148148
$SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault `
149149
-FullPath $FileName `
150150
-TargetServerParam '--microsoft-symbol-server' `
151-
-SymbolsPath $SymbolsPath `
151+
-SymbolsPath "$ExpandedSymbolsPath-msdl" `
152152
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
153153
$SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault `
154154
-FullPath $FileName `
155155
-TargetServerParam '--internal-server' `
156-
-SymbolsPath $SymbolsPath `
156+
-SymbolsPath "$ExpandedSymbolsPath-symweb" `
157157
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
158158

159159
Write-Host -NoNewLine "`t Checking file " $FileName "... "
@@ -217,6 +217,7 @@ function CheckSymbolsAvailable {
217217
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
218218
}
219219

220+
$TotalPackages = 0
220221
$TotalFailures = 0
221222
$DupedSymbols = 0
222223

@@ -239,6 +240,8 @@ function CheckSymbolsAvailable {
239240
return
240241
}
241242

243+
$TotalPackages++
244+
242245
Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList @($FullName,$WindowsPdbVerificationParam) | Out-Null
243246

244247
$NumJobs = @(Get-Job -State 'Running').Count
@@ -264,11 +267,11 @@ function CheckSymbolsAvailable {
264267

265268
if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) {
266269
if ($TotalFailures -gt 0) {
267-
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages"
270+
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures/$TotalPackages packages"
268271
}
269272

270273
if ($DupedSymbols -gt 0) {
271-
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols packages had duplicated symbol files"
274+
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols/$TotalPackages packages had duplicated symbol files and could not be extracted"
272275
}
273276

274277
ExitWithExitCode 1

eng/common/tools.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ function InitializeBuildTool() {
498498
if (Test-Path variable:global:_BuildTool) {
499499
# If the requested msbuild parameters do not match, clear the cached variables.
500500
if($global:_BuildTool.Contains('ExcludePrereleaseVS') -and $global:_BuildTool.ExcludePrereleaseVS -ne $excludePrereleaseVS) {
501-
Remove-Item variable:global:_BuildTool
501+
Remove-Item variable:global:_BuildTool
502502
Remove-Item variable:global:_MSBuildExe
503503
} else {
504504
return $global:_BuildTool
@@ -555,7 +555,7 @@ function GetDefaultMSBuildEngine() {
555555

556556
function GetNuGetPackageCachePath() {
557557
if ($env:NUGET_PACKAGES -eq $null) {
558-
# Use local cache on CI to ensure deterministic build.
558+
# Use local cache on CI to ensure deterministic build.
559559
# Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116
560560
# use global cache in dev builds to avoid cost of downloading packages.
561561
# For directory normalization, see also: https://github.com/NuGet/Home/issues/7968

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"msbuild-sdks": {
3232
"Yarn.MSBuild": "1.22.10",
33-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21261.2",
34-
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21261.2"
33+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21264.2",
34+
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21264.2"
3535
}
3636
}

0 commit comments

Comments
 (0)