Repository navigation
Job Monitor: Fix querying associated jobs in internal builds - #17217
Merged
Merged
Conversation
akoeplinger
approved these changes
Jul 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates how the Helix Job Monitor computes the Helix Source filter so it correctly matches jobs submitted by internal (official) builds, where the repository component is owner-repo rather than owner/repo.
Changes:
- Change
HelixJobSource.Computeto accept repo owner + repo name separately and format the repo identifier asowner-repofor internal builds (andowner/repofor public builds). - Update
JobMonitorRunnerto pass the owner/name components separately when computing_helixSource. - Update/adjust unit tests and tweak DEBUG-time access-token acquisition logic.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/HelixJobSourceTests.cs | Updates test inputs to pass repo owner/name separately for HelixJobSource.Compute. |
| src/Microsoft.DotNet.Helix/JobMonitor/JobMonitorRunner.cs | Passes separate repo components into HelixJobSource.Compute; adjusts status tracking variable usage. |
| src/Microsoft.DotNet.Helix/JobMonitor/JobMonitorOptions.cs | Changes DEBUG token acquisition to use a chained credential approach. |
| src/Microsoft.DotNet.Helix/JobMonitor/HelixJobSource.cs | Updates Compute signature/logic to produce the correct internal/public repo identifier format. |
Comments suppressed due to low confidence (1)
src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/HelixJobSourceTests.cs:84
- The negative test coverage for
HelixJobSource.Computeargument validation was removed when the signature changed. SinceComputestill throws for missing required components, add tests to keep this behavior covered (teamProject/repoOwner/repoName/sourceBranch null/empty).
Assert.Equal(expected, HelixJobSource.Compute(buildReason, teamProject, repoOwner, repoName, sourceBranch));
}
[Theory]
[InlineData("PullRequest", "public", "pr")]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
4
to
7
| using System; | ||
| using System.CommandLine; | ||
| using Azure.Identity; | ||
|
|
Comment on lines
323
to
+327
| if (shouldLogStatus) | ||
| { | ||
| await _reporter.LogPollStatusAsync(stageJobs, completedJobNames, cancellationToken); | ||
| loopState.LastObservedJobCount = stageJobs.Count; | ||
| loopState.LastObservedCompletedCount = completedJobs.Count; | ||
| loopState.LastObservedCompletedCount = completedJobNames.Count; |
Comment on lines
+49
to
+52
| /// <returns>The Helix source string. Never null when <paramref name="teamProject"/> and | ||
| /// <paramref name="repoName"/> are non-empty.</returns> | ||
| /// <exception cref="ArgumentException">Thrown when <paramref name="teamProject"/> or | ||
| /// <paramref name="repoName"/> or <paramref name="sourceBranch"/> is null or empty.</exception> |
pavel-purma
approved these changes
Jul 29, 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.
The internal jobs are submitted with the following source:
official/internal/dotnet-sdk/refs/heads/michaelsimons-pipeline-cleanup-planwhile we search jobs for:
official/internal/dotnet/sdk/refs/heads/michaelsimons-pipeline-cleanup-plan#17212