Skip to content

Commit 178793c

Browse files
[release/10] Update dependencies from dotnet/arcade (#931)
* Update dependencies from https://github.com/dotnet/arcade build 20260831.5 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26429.1 -> To Version 10.0.0-beta.26431.5 * Update dependencies from https://github.com/dotnet/arcade build 20260901.2 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26429.1 -> To Version 10.0.0-beta.26451.2 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 46b48a0 commit 178793c

5 files changed

Lines changed: 307 additions & 11 deletions

File tree

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
</Dependency>
3737
</ProductDependencies>
3838
<ToolsetDependencies>
39-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26429.1">
39+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26451.2">
4040
<Uri>https://github.com/dotnet/arcade</Uri>
41-
<Sha>5593ffa7da58f76139b3b49aac38a757417c9526</Sha>
41+
<Sha>e7d5d251b6f84c1c400deefa11febf2900917783</Sha>
4242
<SourceBuild RepoName="arcade" ManagedOnly="true" />
4343
</Dependency>
4444
</ToolsetDependencies>

eng/common/Get-GitHubAppToken.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,20 @@ $headers = @{
110110

111111
Write-Host "Looking up installation for '$InstallationOwner'..."
112112
try {
113-
$installations = @()
113+
$installations = [System.Collections.Generic.List[object]]::new()
114114
$page = 1
115115
do {
116-
# Assign the response before wrapping it in @(). PowerShell otherwise
117-
# preserves a top-level JSON array as one nested pipeline object.
118116
$pageResponse = Invoke-RestMethod `
119117
-Uri "https://api.github.com/app/installations?per_page=100&page=$page" `
120118
-Headers $headers `
121119
-Method Get
122-
$pageInstallations = @($pageResponse)
123-
$installations += $pageInstallations
120+
$pageInstallationCount = 0
121+
foreach ($installation in $pageResponse) {
122+
$installations.Add($installation)
123+
$pageInstallationCount++
124+
}
124125
$page++
125-
} while ($pageInstallations.Count -eq 100)
126+
} while ($pageInstallationCount -eq 100)
126127
}
127128
catch {
128129
Write-PipelineTelemetryError -Category 'Build' -Message "Failed to list GitHub App installations: $_. The signed JWT may be invalid or the App's Client ID ('$AppClientId') may be incorrect."
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
parameters:
2+
# Maximum run time of the monitor job in minutes. Also used for --max-wait-minutes.
3+
- name: timeoutInMinutes
4+
type: number
5+
default: 360
6+
7+
# Owner segment of the source repository (e.g. 'dotnet' for 'dotnet/runtime') passed via --organization.
8+
# Defaults to the owner segment of BUILD_REPOSITORY_NAME when empty.
9+
- name: organization
10+
type: string
11+
default: ''
12+
13+
# Name of the source repository (e.g. 'runtime' for 'dotnet/runtime') passed via --repository.
14+
# Defaults to the repo segment of BUILD_REPOSITORY_NAME when empty.
15+
- name: repository
16+
type: string
17+
default: ''
18+
19+
# Optional dependency list for the generated job.
20+
- name: dependsOn
21+
type: object
22+
default: []
23+
24+
# Optional condition for the generated job.
25+
- name: condition
26+
type: string
27+
default: ''
28+
29+
# Whether failures in the monitor job should allow the pipeline to continue.
30+
- name: continueOnError
31+
type: boolean
32+
default: false
33+
34+
# NuGet package id of the Helix job monitor tool.
35+
- name: toolPackageId
36+
type: string
37+
default: Microsoft.DotNet.Helix.JobMonitor
38+
39+
# Console command exposed by the installed tool package.
40+
- name: toolCommand
41+
type: string
42+
default: dotnet-helix-job-monitor
43+
44+
# Optional explicit tool version. Only honored when 'toolNupkgArtifactName' is set; in the
45+
# default code path the version is taken from the consuming repo's .config/dotnet-tools.json.
46+
- name: toolVersion
47+
type: string
48+
default: ''
49+
50+
# Base URI for the Helix service (--helix-base-uri).
51+
- name: helixBaseUri
52+
type: string
53+
default: https://helix.dot.net/
54+
55+
# Helix API access token forwarded to the tool via the HELIX_ACCESSTOKEN environment variable.
56+
- name: helixAccessToken
57+
type: string
58+
default: ''
59+
60+
# Polling interval in seconds (--polling-interval-seconds).
61+
- name: pollingIntervalSeconds
62+
type: number
63+
default: 30
64+
65+
# Maximum number of work items whose results may be downloaded, parsed, and
66+
# uploaded concurrently.
67+
- name: testResultUploadParallelism
68+
type: number
69+
default: 48
70+
71+
# When 'true' (the default), Helix work items that exit 0 but have failed AzDO test results
72+
# are treated as failed: they count toward the monitor's exit code and are resubmitted by a
73+
# later invocation's retry pass. Set to 'false' to fall back to exit-code-only outcomes.
74+
# Forwarded as --fail-on-failed-tests.
75+
- name: failWorkItemsWithFailedTests
76+
type: boolean
77+
default: true
78+
79+
# When true, allow the monitor to succeed when this stage produces no Helix jobs in any attempt.
80+
# Forwarded as --allow-no-helix-jobs.
81+
- name: allowNoHelixJobs
82+
type: boolean
83+
default: false
84+
85+
# When true, test results are reported to Azure DevOps using the fully qualified test name
86+
# (Namespace.Type.Method) as the stable automatedTestName and the visible title is qualified as
87+
# well (--use-fully-qualified-test-name). Opt-in because it changes AzDO test identity and display;
88+
# primarily useful for frameworks like MSTest whose display name is only the method name.
89+
- name: useFullyQualifiedTestName
90+
type: boolean
91+
default: false
92+
93+
# Controls per-test output attachments. Defaults to Failed.
94+
- name: testResultAttachmentMode
95+
type: string
96+
default: Failed
97+
values:
98+
- Failed
99+
- All
100+
- None
101+
102+
# Advanced: optional pipeline artifact (produced earlier in this run) that contains the tool
103+
# nupkg. When set, the artifact is downloaded and the tool is installed from the nupkg into
104+
# a local tool-path; this bypasses the repo's .config/dotnet-tools.json manifest and is
105+
# primarily intended for the Arcade repository itself, where the Helix job monitor tool is
106+
# built in the same pipeline that runs this template.
107+
#
108+
# When this parameter is empty (the default), the consuming repository must declare the tool
109+
# in its .config/dotnet-tools.json manifest (alongside other local .NET tools); the template
110+
# will check out the repo and run 'dotnet tool restore' to install the version pinned there.
111+
- name: toolNupkgArtifactName
112+
type: string
113+
default: ''
114+
115+
# Advanced: sub-path within the downloaded artifact where the tool nupkg is located. Defaults
116+
# to the standard Arcade non-shipping packages location for a Release build (relative to the
117+
# pipeline artifact root, which is itself the build's 'artifacts' directory).
118+
- name: toolNupkgArtifactSubPath
119+
type: string
120+
default: 'packages/Release/NonShipping'
121+
122+
jobs:
123+
- job: HelixJobMonitor
124+
displayName: Monitor Helix Jobs
125+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
126+
continueOnError: ${{ parameters.continueOnError }}
127+
${{ if ne(length(parameters.dependsOn), 0) }}:
128+
dependsOn: ${{ parameters.dependsOn }}
129+
${{ if ne(parameters.condition, '') }}:
130+
condition: ${{ parameters.condition }}
131+
pool:
132+
${{ if eq(variables['System.TeamProject'], 'public') }}:
133+
name: $(DncEngPublicBuildPool)
134+
os: linux
135+
demands: ImageOverride -equals build.azurelinux.3.amd64.open
136+
${{ else }}:
137+
name: $(DncEngInternalBuildPool)
138+
os: linux
139+
demands: ImageOverride -equals build.azurelinux.3.amd64
140+
steps:
141+
- checkout: self
142+
fetchDepth: 1
143+
144+
- ${{ if ne(parameters.toolNupkgArtifactName, '') }}:
145+
- task: DownloadPipelineArtifact@2
146+
displayName: Download Helix Job Monitor artifact
147+
inputs:
148+
buildType: current
149+
artifactName: ${{ parameters.toolNupkgArtifactName }}
150+
itemPattern: '${{ parameters.toolNupkgArtifactSubPath }}/${{ parameters.toolPackageId }}.*.nupkg'
151+
targetPath: $(Agent.TempDirectory)/helix-job-monitor-nupkg
152+
153+
- bash: |
154+
set -euo pipefail
155+
156+
toolPath="$AGENT_TEMPDIRECTORY/helix-job-monitor-tool"
157+
mkdir -p "$toolPath"
158+
159+
packageId='${{ parameters.toolPackageId }}'
160+
toolVersion='${{ parameters.toolVersion }}'
161+
nupkgArtifactSubPath='${{ parameters.toolNupkgArtifactSubPath }}'
162+
nupkgDir="$AGENT_TEMPDIRECTORY/helix-job-monitor-nupkg/$nupkgArtifactSubPath"
163+
164+
if [ ! -d "$nupkgDir" ]; then
165+
echo "Expected nupkg directory '$nupkgDir' was not produced by the artifact download." >&2
166+
exit 1
167+
fi
168+
169+
nupkg=$(find "$nupkgDir" -maxdepth 1 -type f -name "$packageId.*.nupkg" | head -n 1)
170+
if [ -z "$nupkg" ]; then
171+
echo "No '$packageId.*.nupkg' found in '$nupkgDir'." >&2
172+
exit 1
173+
fi
174+
175+
# Derive the version from the nupkg filename so the local package is selected
176+
# deterministically instead of resolving against any other configured feed.
177+
nupkgBase=$(basename "$nupkg" .nupkg)
178+
derivedVersion="${nupkgBase#${packageId}.}"
179+
if [ -z "$toolVersion" ]; then
180+
toolVersion="$derivedVersion"
181+
fi
182+
183+
echo "Using locally built '$packageId' version '$toolVersion' from '$nupkgDir'."
184+
185+
# Create a minimal NuGet.config that only references the local nupkg directory.
186+
# This avoids conflicts with the repo's package source mapping which blocks --add-source.
187+
toolNugetConfig="$AGENT_TEMPDIRECTORY/helix-job-monitor-nuget.config"
188+
printf '<?xml version="1.0" encoding="utf-8"?>\n<configuration>\n <packageSources>\n <clear />\n <add key="local-tool" value="%s" />\n </packageSources>\n</configuration>\n' "$nupkgDir" > "$toolNugetConfig"
189+
190+
pushd "$(Build.SourcesDirectory)" > /dev/null
191+
./eng/common/dotnet.sh tool install \
192+
--tool-path "$toolPath" "$packageId" \
193+
--version "$toolVersion" \
194+
--configfile "$toolNugetConfig"
195+
196+
# Locate the tool DLL so the run step can invoke it via ./eng/common/dotnet.sh exec.
197+
toolDll=$(find "$toolPath/.store" -path '*/tools/*/any/*.deps.json' -type f | head -n 1)
198+
toolDll="${toolDll%.deps.json}.dll"
199+
if [ ! -f "$toolDll" ]; then
200+
echo "Could not find tool DLL in '$toolPath/.store'." >&2
201+
exit 1
202+
fi
203+
204+
echo "Tool DLL: $toolDll"
205+
echo "##vso[task.setvariable variable=HelixJobMonitorDll]$toolDll"
206+
displayName: Install Helix Job Monitor
207+
208+
- ${{ else }}:
209+
- bash: ./eng/common/dotnet.sh tool restore
210+
displayName: Restore Helix Job Monitor
211+
212+
- bash: |
213+
set -euo pipefail
214+
215+
toolArgs=(
216+
--helix-base-uri '${{ parameters.helixBaseUri }}'
217+
--polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}'
218+
--fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}'
219+
--allow-no-helix-jobs '${{ parameters.allowNoHelixJobs }}'
220+
--use-fully-qualified-test-name '${{ parameters.useFullyQualifiedTestName }}'
221+
--max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully.
222+
--stage-name '$(System.StageName)'
223+
--stage-attempt '$(System.StageAttempt)'
224+
--job-attempt '$(System.JobAttempt)'
225+
--test-result-upload-parallelism '${{ parameters.testResultUploadParallelism }}'
226+
)
227+
228+
organization='${{ parameters.organization }}'
229+
repository='${{ parameters.repository }}'
230+
testResultAttachmentMode='${{ parameters.testResultAttachmentMode }}'
231+
232+
# Fall back to Azure DevOps-provided environment variables when the caller did not
233+
# supply organization / repository explicitly. BUILD_REPOSITORY_NAME is typically
234+
# 'owner/repo' for GitHub-backed builds and 'owner-repo' for internal builds.
235+
if [ -z "$organization" ] || [ -z "$repository" ]; then
236+
buildRepoName="${BUILD_REPOSITORY_NAME:-}"
237+
if [ -n "$buildRepoName" ] && [[ "$buildRepoName" == */* ]]; then
238+
repoOwner="${buildRepoName%%/*}"
239+
repoName="${buildRepoName#*/}"
240+
elif [ -n "$buildRepoName" ] && [[ "$buildRepoName" == *-* ]]; then
241+
repoOwner="${buildRepoName%%-*}"
242+
repoName="${buildRepoName#*-}"
243+
fi
244+
245+
if [ -n "${repoOwner:-}" ] && [ -n "${repoName:-}" ]; then
246+
if [ -z "$organization" ]; then organization="$repoOwner"; fi
247+
if [ -z "$repository" ]; then repository="$repoName"; fi
248+
fi
249+
fi
250+
251+
if [ -n "$organization" ]; then toolArgs+=( --organization "$organization" ); fi
252+
if [ -n "$repository" ]; then toolArgs+=( --repository "$repository" ); fi
253+
if [ -n "$testResultAttachmentMode" ]; then
254+
toolArgs+=( --test-result-attachment-mode "$testResultAttachmentMode" )
255+
fi
256+
257+
# Build.Reason and Build.SourceBranch are required to derive the Helix source filter
258+
# the same way the Helix SDK submitter does (PR -> 'pr', internal -> 'official',
259+
# otherwise -> 'ci'). Without these, manually-queued / scheduled / CI builds would
260+
# be looked up under the wrong source prefix and find zero jobs.
261+
toolArgs+=( --build-reason "$(Build.Reason)" )
262+
toolArgs+=( --source-branch "$(Build.SourceBranch)" )
263+
264+
if [ -n '${{ parameters.toolNupkgArtifactName }}' ]; then
265+
# Tool was installed from a local nupkg; run the DLL via the repo-local dotnet.
266+
export DOTNET_ROOT="$(Build.SourcesDirectory)/.dotnet"
267+
./eng/common/dotnet.sh exec "$(HelixJobMonitorDll)" "${toolArgs[@]}"
268+
else
269+
# Tool was restored from the local .config/dotnet-tools.json manifest; invoke it
270+
# through the manifest from the repo root.
271+
pushd "$BUILD_SOURCESDIRECTORY" > /dev/null
272+
trap 'popd > /dev/null' EXIT
273+
./eng/common/dotnet.sh tool run '${{ parameters.toolCommand }}' -- "${toolArgs[@]}"
274+
fi
275+
displayName: Monitor Helix Jobs
276+
env:
277+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
278+
HELIX_ACCESSTOKEN: ${{ parameters.helixAccessToken }}

eng/common/core-templates/steps/send-to-helix.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parameters:
1010
HelixConfiguration: '' # optional -- additional property attached to a job
1111
HelixPreCommands: '' # optional -- commands to run before Helix work item execution
1212
HelixPostCommands: '' # optional -- commands to run after Helix work item execution
13+
UseHelixMonitor: false # optional -- true will submit Helix jobs configured for the standalone Helix Job Monitor (results are reported/waited on out-of-band; this step will not wait, and WaitForWorkItemCompletion will be overridden)
1314
WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
1415
WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
1516
WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
@@ -31,7 +32,15 @@ parameters:
3132
continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
3233

3334
steps:
34-
- powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
35+
- powershell: >
36+
$(Build.SourcesDirectory)\eng\common\msbuild.ps1
37+
$(Build.SourcesDirectory)/${{ parameters.HelixProjectPath }}
38+
/restore
39+
/p:TreatWarningsAsErrors=false
40+
/p:EnableHelixJobMonitor=${{ parameters.UseHelixMonitor }}
41+
${{ parameters.HelixProjectArguments }}
42+
/t:Test
43+
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
3544
displayName: ${{ parameters.DisplayNamePrefix }} (Windows)
3645
env:
3746
BuildConfig: $(_BuildConfig)
@@ -61,7 +70,15 @@ steps:
6170
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
6271
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
6372
continueOnError: ${{ parameters.continueOnError }}
64-
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
73+
- script: >
74+
$(Build.SourcesDirectory)/eng/common/msbuild.sh
75+
$(Build.SourcesDirectory)/${{ parameters.HelixProjectPath }}
76+
/restore
77+
/p:TreatWarningsAsErrors=false
78+
/p:EnableHelixJobMonitor=${{ parameters.UseHelixMonitor }}
79+
${{ parameters.HelixProjectArguments }}
80+
/t:Test
81+
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
6582
displayName: ${{ parameters.DisplayNamePrefix }} (Unix)
6683
env:
6784
BuildConfig: $(_BuildConfig)

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"msbuild-sdks": {
1111
"Microsoft.Build.NoTargets": "3.7.0",
12-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26429.1",
12+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26451.2",
1313
"Microsoft.VisualStudio.Internal.MicroBuild.Vsman": "2.0.174"
1414
}
1515
}

0 commit comments

Comments
 (0)