JobMonitor: Don't reprocess previously processed jobs on reruns#17041
Open
premun wants to merge 1 commit into
Open
JobMonitor: Don't reprocess previously processed jobs on reruns#17041premun wants to merge 1 commit into
premun wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent JobMonitor reruns (within the same build) from reprocessing Helix jobs that were already uploaded/processed previously, reducing duplicate uploads and noisy/misleading log output.
Changes:
- Added a new unit test asserting that previously processed Helix jobs are not re-uploaded and do not re-emit “completed/processing” log lines.
- Updated
JobMonitorRunner.ReconcileCompletedJobAsyncto early-return when a job is inProcessedHelixJobs(in addition toWorkItemOutcomeJobs).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/JobMonitorRunnerTests.cs | Adds coverage to ensure reruns don’t re-upload or re-log completion for previously processed jobs. |
| src/Microsoft.DotNet.Helix/JobMonitor/JobMonitorRunner.cs | Attempts to skip reconciliation for jobs already marked processed to avoid duplicate logs/uploads on reruns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+300
to
310
| // Skip jobs whose results have already been uploaded — either earlier in this | ||
| // invocation (tracked via WorkItemOutcomeJobs) or by a previous monitor attempt | ||
| // for the same build (tracked via ProcessedHelixJobs, seeded on entry from the | ||
| // AzDO test-run name markers). Without this, a retried monitor invocation | ||
| // re-logs "Job X completed" and re-reports failed work-item console links for | ||
| // every job the prior attempt already finished, which is noisy and misleading. | ||
| if (_state.WorkItemOutcomeJobs.Contains(helixJob.JobName) | ||
| || _state.ProcessedHelixJobs.Contains(helixJob.JobName)) | ||
| { | ||
| return; | ||
| } |
Member
There was a problem hiding this comment.
I think that if a job is already processed as failed but can't be resbumitted, that would also be a failure.
mmitche
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.