Skip to content

Use Build Matrix Trimming in (at least) nightly PR validation #7023

Description

@lbussell

In PRs that only change a couple of images, we waste a ton of compute running build legs that ultimately do nothing. In the nightly repo, I think we can better optimize for PR validation speed by turning on Build matrix trimming.

Open question: should we should turn it on for any other pipelines?

Definitely:

  • nightly PR validation

Maybe:

  • nightly (no-cache) PR validation
  • main PR validation
  • main (no-cache) PR validation
  • release PR validation
  • etc.

Activity

  1. lbussell commented on Feb 2, 2026

    @lbussell
    MemberAuthor

    [Triage] Trimming the pipelines make sense. However, we need to ensure that if tests or pipelines are changed, we validate all images. This could involve updating imageBuilder.PathArgs in the no-cache pipelines to have different paths depending on which paths were changed. Example:

    steps:
    - powershell: |
        $changes = git diff-tree --no-commit-id --name-only -r $(Build.SourceVersion)
        if ($changes -match "^eng/") {
          Write-Host "##vso[task.setvariable variable=EngChanged]true"
        }
        if ($changes -match "^tests/") {
          Write-Host "##vso[task.setvariable variable=TestsChanged]true"
        }
      displayName: 'Detect Changed Paths'
  2. moved this from Backlog to Current Release in .NET Dockeron Feb 2, 2026
  3. added theissue type on Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Current Release

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions