Skip to content

[release/10.0] Backport remaining Helix Job Monitor changes from main - #17849

Merged
premun merged 12 commits into
dotnet:release/10.0from
premun:sync/helix-monitor-release-10.0
Nov 27, 2026
Merged

premun merged 12 commits into
dotnet:release/10.0from
premun:sync/helix-monitor-release-10.0

Conversation

@premun

@premun premun commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Brings the Helix Job Monitor and related Helix infrastructure on release/10.0 in line with main by backporting changes not yet on this branch:

Follow-up to #17844 (backport of #17704).

Copilot AI and others added 8 commits November 27, 2026 16:40
dotnet#17571)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
(cherry picked from commit 7f17e89)
Use cone-mode sparse checkout for `eng` and `.config`, paired with `fetchFilter: blob:none` to avoid fetching unrelated source blobs. Cone mode also includes all root-level files, preserving `global.json` and NuGet configuration; an inline comment above `sparseCheckoutDirectories` documents this behavior.

Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
(cherry picked from commit 0841a2f)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 7dad901)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 5f7e3d1)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The XHarness test changes from dotnet#17571 depend on TaskEnvironment, which this
branch's XHarness tasks do not use, so the current-directory race they fix
does not apply here.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 15:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Stage-name mismatches can exclude intended timeline records and Helix jobs, while watchdog cleanup leaves sleep processes alive and missing job-attempt propagation prevents retry reconciliation during local debugging.

3 open issues
What changed in this PR

Backports remaining Helix Job Monitor and related infrastructure changes to release/10.0, preserving release-specific APIs and excluding the breaking SDK rename.

Changes:

  • Adds file-system injection for isolated reader tests and coverage for result aggregation.
  • Enables redirected client downloads and updates XHarness crash handling and watchdog management.
  • Adds a local monitor debugging script and sparse pipeline checkout.
File Description
src/​Microsoft.DotNet.SwaggerGenerator/​Microsoft.DotNet.SwaggerGenerator.CodeGenerator/​Languages/​csharp/​ServiceClient.hb Enables redirects in generated clients.
src/​Microsoft.DotNet.Helix/​Sdk/​tools/​xharness-runner/​xharness-runner.apple.sh Tracks and stops the watchdog shell.
src/​Microsoft.DotNet.Helix/​Sdk/​tools/​xharness-runner/​xharness-helix-job.android.sh Adds watchdog shutdown while preserving command status.
src/​Microsoft.DotNet.Helix/​Sdk/​tools/​xharness-runner/​xharness-event-processor.py Avoids crash-triggered retries and reboots on physical Android devices.
src/​Microsoft.DotNet.Helix/​Sdk.Tests/​Microsoft.DotNet.Helix.Sdk.Tests/​ResultAggregatorTests.cs Covers qualified-name and legacy grouping behavior.
src/​Microsoft.DotNet.Helix/​Sdk.Tests/​Microsoft.DotNet.Helix.Sdk.Tests/​LocalTestResultsReaderTests.cs Uses mock files instead of disk and global directory changes.
src/​Microsoft.DotNet.Helix/​JobMonitor/​TestResults/​LocalTestResultsReader.cs Adds injectable file-system access.
src/​Microsoft.DotNet.Helix/​Client/​CSharp/​generated-code/​HelixApi.cs Enables redirects in the generated Helix client.
src/​Common/​Microsoft.Arcade.Test.Common/​MockFileSystem.cs Returns stored content from read streams.
src/​Common/​Microsoft.Arcade.Test.Common/​MockBuildEngine.cs Adds a combined error summary for test diagnostics.
scripts/​run-helix-job-monitor.ps1 Resolves build context for local monitor execution or debugging arguments.
eng/​common/​core-templates/​job/​helix-job-monitor.yml Limits checkout to monitor bootstrap files using sparse checkout.

Review effort: Balanced

$stage = Get-OwningStage -Job $_ -RecordsById $recordsById
if ($null -ne $stage) {
[pscustomobject]@{
StageName = [string] $stage.name
'--build-id', [string] $buildId,
'--helix-base-uri', 'https://helix.dot.net/',
'--stage-name', $resolvedStageName,
'--stage-attempt', [string] $StageAttempt,
Comment on lines +194 to +195
kill $WATCHDOG_PID 2> /dev/null
wait $WATCHDOG_PID 2> /dev/null
…tNet.SwaggerGenerator.CodeGenerator/Languages/csharp/ServiceClient.hb
Copilot AI balanced review requested due to automatic review settings November 27, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The script passes stage display names instead of refName values, causing valid stages’ timeline records and Helix jobs to be excluded from monitoring.

4 open issues

Review effort: Balanced

private static HttpPipeline CreatePipeline(HelixApiOptions options)
{
return HttpPipelineBuilder.Build(options, Array.Empty<HttpPipelinePolicy>(), Array.Empty<HttpPipelinePolicy>(), new HelixApiResponseClassifier());
return HttpPipelineBuilder.Build(options, Array.Empty<HttpPipelinePolicy>(), Array.Empty<HttpPipelinePolicy>(), new HttpPipelineTransportOptions() { IsClientRedirectEnabled = true }, new HelixApiResponseClassifier());
@premun
premun merged commit 65c499e into dotnet:release/10.0 Nov 27, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants