-
Notifications
You must be signed in to change notification settings - Fork 2k
[net11.0] Use Helix job monitor for unit tests #37852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,9 +91,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: 360 | ||
| 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)" \ | ||
| --helix-base-uri 'https://helix.dot.net/' \ | ||
| --polling-interval-seconds 30 \ | ||
| --fail-on-failed-tests true \ | ||
| --max-wait-minutes 355 \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Config Impact — Keep the monitor outer and inner timeouts coupled. This inline copy hard-codes
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in b03c30e. |
||
| --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) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pinned Job Monitor reads |
||
| HELIX_ACCESSTOKEN: ${{ parameters.HelixAccessToken }} | ||
There was a problem hiding this comment.
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.