Skip to content

Job Monitor: Fix querying associated jobs in internal builds - #17217

Merged
premun merged 1 commit into
dotnet:mainfrom
premun:prvysoky/linux
Jul 29, 2026
Merged

premun merged 1 commit into
dotnet:mainfrom
premun:prvysoky/linux

Conversation

@premun

@premun premun commented Jul 29, 2026

Copy link
Copy Markdown
Member

The internal jobs are submitted with the following source:
official/internal/dotnet-sdk/refs/heads/michaelsimons-pipeline-cleanup-plan
while we search jobs for:
official/internal/dotnet/sdk/refs/heads/michaelsimons-pipeline-cleanup-plan

#17212

Copilot AI review requested due to automatic review settings July 29, 2026 11:54
@premun
premun enabled auto-merge (squash) July 29, 2026 11:54

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

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.Compute to accept repo owner + repo name separately and format the repo identifier as owner-repo for internal builds (and owner/repo for public builds).
  • Update JobMonitorRunner to 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.Compute argument validation was removed when the signature changed. Since Compute still 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>
@premun
premun merged commit 039623c into dotnet:main Jul 29, 2026
9 of 10 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Jul 30, 2026
@premun
premun deleted the prvysoky/linux branch August 10, 2026 10:46
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.

4 participants