Skip to content

JobMonitor: route warnings/errors through AzDO timeline issue logging and remove log emojis - #16952

Merged
mmitche merged 10 commits into
mainfrom
copilot/fix-job-monitor-logging
Jun 3, 2026
Merged

mmitche merged 10 commits into
mainfrom
copilot/fix-job-monitor-logging

Conversation

Copilot AI commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

JobMonitor failures were not consistently emitted in a timeline-ingestible format, so key work item failure details could be missed in AzDO build timeline diagnostics. This change standardizes warning/error emission through prefixed logger helpers and applies it to failure-critical monitor paths.

  • AzDO issue-prefix logging helpers

    • Added centralized warning/error helpers in JobMonitorRunner that prepend:
      • ##vso[task.logissue type=warning]
      • ##vso[task.logissue type=error]
    • Added matching error helper usage in Program for unhandled monitor exceptions.
  • Failure paths now emit timeline issues

    • Failed work item console-link messages now emit as warnings (timeline-visible).
    • Final failed work-item summary, timeout reporting, cancellation failures, and non-monitor pipeline failure signaling now emit as errors/warnings via the helper path.
  • Emoji cleanup for JobMonitor logs

    • Removed all emoji markers (including ❌) from JobMonitor log statements to reduce visual noise; AzDO timeline coloring and ##[warning]/##[error] rendering already provide sufficient visual prominence.
  • Focused test updates

    • Updated JobMonitorRunnerTests assertions to verify warning/error prefixes are present for failed work-item and timeout/error logs.
    • Updated assertions that previously expected emoji-prefixed log text.
    • Ran targeted validation: ./eng/common/dotnet.sh test src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests.csproj --filter FullyQualifiedName~JobMonitorRunnerTests (47/47 passing).
private void LogWarning(string message)
    => _logger.LogWarning("{Prefix}{Message}", "##vso[task.logissue type=warning]", message);

private void LogError(string message)
    => _logger.LogError("{Prefix}{Message}", "##vso[task.logissue type=error]", message);

To double check:

Copilot AI self-assigned this Jun 2, 2026
Copilot AI review requested due to automatic review settings June 2, 2026 16:41
Copilot AI removed the request for review from Copilot June 2, 2026 16:41
Copilot AI requested review from Copilot and removed request for Copilot June 2, 2026 16:46
Copilot AI requested review from Copilot and removed request for Copilot June 2, 2026 16:48
Copilot AI changed the title [WIP] Fix job monitor logging for errors and warnings in timeline JobMonitor: route warnings/errors through AzDO timeline issue logging Jun 2, 2026
Copilot AI requested a review from mmitche June 2, 2026 16:51
@premun

premun commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

@mmitche, I think we should maybe remove the emojis? It's red enough:

image image image

@premun

premun commented Jun 3, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copilot AI requested review from Copilot and removed request for Copilot June 3, 2026 08:27

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved by merging latest origin/main and fixing the conflict in JobMonitorRunner in commit e22c96477.

Copilot finished work on behalf of premun June 3, 2026 08:27
Copilot AI requested a review from premun June 3, 2026 08:27
@premun

premun commented Jun 3, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved by merging latest origin/main and fixing the test conflicts in commit ba286eb.

Copilot AI review requested due to automatic review settings June 3, 2026 10:58
@premun

premun commented Jun 3, 2026

Copy link
Copy Markdown
Member

@copilot can you remove the emojis like ❌ from the log statements in the job monitor? Also make sure tests still pass

Copilot AI requested review from Copilot and removed request for Copilot June 3, 2026 11:06
Copilot AI review requested due to automatic review settings June 3, 2026 11:08
@premun

premun commented Jun 3, 2026

Copy link
Copy Markdown
Member

@copilot can you remove the ❌ emojis from the error/warning log statements in the job monitor? Also make sure tests still pass

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot can you remove the emojis like ❌ from the log statements in the job monitor? Also make sure tests still pass

Done in commit 2f142c9. I removed the emojis from JobMonitor log statements (including the ❌ warning/error lines) and updated the related assertions. I also ran JobMonitorRunnerTests (--filter FullyQualifiedName~JobMonitorRunnerTests), and they pass.

Copilot AI changed the title JobMonitor: route warnings/errors through AzDO timeline issue logging JobMonitor: route warnings/errors through AzDO timeline issue logging and remove log emojis Jun 3, 2026
Copilot finished work on behalf of premun June 3, 2026 11:11

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.

Pull request overview

Standardizes JobMonitor warning/error logging so failures surface as Azure DevOps timeline issues via ##vso[task.logissue ...], and updates tests to assert the new prefixes on key failure paths.

Changes:

  • Add centralized AzDO warning/error prefix helpers in JobMonitorRunner and route multiple failure paths through them.
  • Update Program to emit unhandled exceptions via an AzDO-prefixed error helper.
  • Update JobMonitorRunnerTests assertions to expect the new warning/error prefixes on timeout and failed work-item logs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/JobMonitorRunnerTests.cs Updates assertions to expect AzDO task.logissue prefixes on timeout and failure logs.
src/Microsoft.DotNet.Helix/JobMonitor/Program.cs Routes unhandled exception logging through an AzDO-prefixed error helper.
src/Microsoft.DotNet.Helix/JobMonitor/JobMonitorRunner.cs Introduces AzDO warning/error helpers and uses them in failure/timeout/cancellation-related logging paths.

Copilot finished work on behalf of premun June 3, 2026 11:19
Copilot AI review requested due to automatic review settings June 3, 2026 11:19

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

@premun
premun marked this pull request as ready for review June 3, 2026 14:02
@mmitche
mmitche enabled auto-merge (squash) June 3, 2026 14:33
@mmitche
mmitche merged commit 24bd601 into main Jun 3, 2026
10 of 11 checks passed
@mmitche
mmitche deleted the copilot/fix-job-monitor-logging branch June 3, 2026 15:18
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 4, 2026
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.

Job Monitor errors and failed work item info should make it into the timeline

5 participants