Skip to content
Merged
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
65 changes: 62 additions & 3 deletions eng/pipelines/arcade/stage-helix-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ parameters:
default:
- Debug
- Release
- name: helixJobMonitorTimeoutInMinutes
type: number
default: 360
Comment on lines +50 to +52

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter follows the canonical Arcade monitor template contract and defaults to 360 minutes; MAUI has no caller overriding it. Clamping a deliberately invalid job timeout would be misleading because a <=5-minute Azure job cannot preserve the required five-minute graceful-shutdown window. No change is needed for the configured path.

- name: helixPool
type: object

Expand Down Expand Up @@ -91,9 +94,65 @@ stages:
DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token)
PRIVATE_BUILD: $(PrivateBuild)

- script: $(_msbuildCommand) "${{ parameters.helixProject }}" -warnAsError 0 -restore /p:Configuration=${{ BuildConfiguration }} /p:HelixInternal="${{ parameters.helixInternal }}" /p:TestRunNameSuffix="_${{ BuildConfiguration }}" /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/helix_tests.binlog ${{ parameters.extraHelixArguments }}
- script: $(_msbuildCommand) "${{ parameters.helixProject }}" -warnAsError 0 -restore /p:Configuration=${{ BuildConfiguration }} /p:EnableHelixJobMonitor=true /p:HelixInternal="${{ parameters.helixInternal }}" /p:TestRunNameSuffix="_${{ BuildConfiguration }}" /p:SkipInitInternalTooling=true /bl:$(Build.Arcade.LogsPath)${{ BuildConfiguration }}/helix_tests.binlog ${{ parameters.extraHelixArguments }}
displayName: Run Helix Tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: ${{ parameters.HelixAccessToken }}


- job: HelixJobMonitor
displayName: Monitor Helix Jobs
timeoutInMinutes: ${{ parameters.helixJobMonitorTimeoutInMinutes }}
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals build.azurelinux.3.amd64.open
${{ else }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals build.azurelinux.3.amd64
steps:
- checkout: self
fetchDepth: 1

- bash: |
set -euo pipefail

toolPath="$AGENT_TEMPDIRECTORY/helix-job-monitor"
bash ./eng/common/dotnet.sh
toolVersion=$(bash ./eng/common/dotnet.sh msbuild eng/Versions.props -getProperty:MicrosoftDotNetHelixSdkPackageVersion -nologo | tail -n 1)
if [[ -z "$toolVersion" || "$toolVersion" =~ [[:space:]] ]]; then
echo "Could not read the Helix SDK package version from eng/Versions.props." >&2
exit 1
fi

bash ./eng/common/dotnet.sh tool install \
--tool-path "$toolPath" \
Microsoft.DotNet.Helix.JobMonitor \
--version "$toolVersion"

toolDll=$(find "$toolPath/.store" -path '*/tools/*/any/Microsoft.DotNet.Helix.JobMonitor.dll' -type f -print -quit)
if [ ! -f "$toolDll" ]; then
echo "Could not find the Helix Job Monitor DLL in '$toolPath/.store'." >&2
exit 1
fi

echo "##vso[task.setvariable variable=HelixJobMonitorDll]$toolDll"
displayName: Install Helix Job Monitor

- bash: |
set -euo pipefail

bash ./eng/common/dotnet.sh exec "$(HelixJobMonitorDll)" \
Comment on lines +133 to +145

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DLL invocation is intentional and matches the canonical Arcade template’s isolated-package path: it runs the net11-targeted tool through MAUI’s pinned repo-local SDK. Invoking the shim directly would delegate runtime selection to the host environment, which is exactly what this job must avoid before/around SDK bootstrapping. The exact pinned package layout was also exercised successfully in builds 1568946 and 1569038.

--helix-base-uri 'https://helix.dot.net/' \
--polling-interval-seconds 30 \
--fail-on-failed-tests true \
--max-wait-minutes "$((${{ parameters.helixJobMonitorTimeoutInMinutes }} - 5))" \
Comment on lines +145 to +149

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of the timeout-contract comment above. The configured value is 360, there are no overrides, and silently clamping an invalid <=5-minute job timeout would not preserve the shutdown invariant.

--stage-name '$(System.StageName)' \
--organization dotnet \
--repository maui \
--build-reason '$(Build.Reason)' \
--source-branch '$(Build.SourceBranch)'
displayName: Monitor Helix Jobs
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pinned Job Monitor reads HELIX_ACCESSTOKEN; this is also the environment variable set by Arcade’s canonical helix-job-monitor.yml template. The submission job uses a different client contract (HelixAccessToken), so aligning these names would break the monitor rather than improve compatibility.

HELIX_ACCESSTOKEN: ${{ parameters.HelixAccessToken }}
Loading