Repository navigation
Skip CI build/test legs for documentation- and .github-only changes - #14371
Conversation
The onlyDocChanged mechanism only skipped tests, not the build: several build steps (Linux Core, macOS Core, Windows legs) had no condition and always ran a full ~8-12 min build even for PRs touching only .github/** or documentation/** (the eq(onlyDocChanged, 0) line beneath them belonged to the coverage step). Only the "Linux Core Multithreaded Mode" leg was correctly gated. Gate every build step on eq(variables.onlyDocChanged, 0), matching the one leg that already did this, and remove the now-redundant "cibuild.cmd without test" fallback. Apply the same inline skip to the three msbuild-quarantine legs, which previously hardcoded onlyDocChanged=0 and always ran. Uses the existing check-documentation-only-change.yml template inline in each job (no cross-job dependency, no build latency for normal PRs), so doc/.github-only PRs finish these legs in agent+checkout time instead of running full builds. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 95de2e0b-cc2f-47fc-a95a-3d66f8cd1d1a
There was a problem hiding this comment.
Pull request overview
This PR optimizes MSBuild’s Azure Pipelines validation by skipping expensive build/test steps when a PR changes only documentation (documentation/**) or workflow/config content (.github/**), while still allowing required checks to complete quickly.
Changes:
- Gate heavyweight CI build steps in
.vsts-dotnet-ci.ymlononlyDocChanged == 0, and remove the Windows Full Release “build without test” fallback. - Apply the same doc-only detection template to
azure-pipelines/quarantine.ymljobs and gate the quarantined-test build steps ononlyDocChanged == 0.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| azure-pipelines/quarantine.yml | Adds doc-only change detection and skips quarantined-test build steps when appropriate. |
| .vsts-dotnet-ci.yml | Adds onlyDocChanged gating to previously-ungated CI build steps and removes redundant fallback build step. |
…runs quarantine.yml also runs on a daily schedule (and rolling main builds) to collect quarantined-test data. Gating purely on onlyDocChanged would skip that revalidation whenever the latest commit is docs-only. Guard the skip with Build.Reason == PullRequest so only PR validation skips doc-only changes; scheduled and CI runs always execute. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 95de2e0b-cc2f-47fc-a95a-3d66f8cd1d1a
There was a problem hiding this comment.
Code Review Summary
✅ 24/24 dimensions clean — no findings.
This PR correctly extends the existing onlyDocChanged gating pattern to additional CI legs and quarantine jobs. The template paths are correct (repo-root-relative), the condition syntax matches established usage, and removing the redundant build-without-test fallback is a good simplification.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpg
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
Generated by Expert Code Review (on open) for #14371 · 65 AIC · ⌖ 7.36 AIC · ⊞ 4.8K
|
/azp run msbuild-pr |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Quarantines 2 intermittently failing tests detected across multiple independent CI sources. --- ## `NuGetStaticGraphRestore_InheritsCoordinatorGrant_DoesNotDeadlock` **Flaky-test key** (automated de-duplication — do not edit): ```text flaky-test-id: Microsoft.Build.Coordinator.UnitTests.CoordinatorIntegration_Tests.NuGetStaticGraphRestore_InheritsCoordinatorGrant_DoesNotDeadlock ``` **Action:** Quarantine (6a) Tracked by #14488 - **Distinct sources:** 5 (2 PRs + 3 rolling builds) - **PRs:** #14371, #14401 - **Rolling builds:** [1511941](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1511941), [1517682](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1517682), [1519967](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1519967) - **Legs/TFMs:** CoreOnMac, FullOnWindows, FullOnWindows Release / net10.0, net472 - **Assembly:** MSBuild.Coordinator.UnitTests - **Window:** 2026-07-15 – 2026-07-21 - **Sample error:** `System.TimeoutException : Test failed due to timeout: process is active for more than 60 sec.` --- ## `TaskExceptionHandlingTest` **Flaky-test key** (automated de-duplication — do not edit): ```text flaky-test-id: Microsoft.Build.UnitTests.BackEnd.TaskExecutionHost_Tests.TaskExceptionHandlingTest ``` **Action:** Quarantine (6a) Tracked by #14459 - **Distinct sources:** 5 (1 PR + 4 rolling builds) - **PRs:** #14315 - **Rolling builds:** [1510684](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1510684), [1517216](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1517216), [1519472](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1519472), [1519928](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1519928) - **Legs/TFMs:** FullOnWindows Release / net472 - **Assembly:** Microsoft.Build.Engine.UnitTests - **Window:** 2026-07-15 – 2026-07-21 - **Sample error:** `Shouldly.ShouldAssertException` in `TaskExceptionHandlingTest` > [!WARNING] > <details> > <summary>Firewall blocked 2 domains</summary> > > The following domains were blocked by the firewall during workflow execution: > > - `awmgmcpg` > - `southcentralus0.in.applicationinsights.azure.com` >> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter: > > ```yaml > network: > allowed: > - defaults > - "awmgmcpg" > - "southcentralus0.in.applicationinsights.azure.com" > ``` > > See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information. > > </details> > Generated by [Flaky Test Triage](https://github.com/dotnet/msbuild/actions/runs/30006270630) · 126 AIC · ⌖ 6.2 AIC · ⊞ 14.8K · [◷](https://github.com/search?q=repo%3Adotnet%2Fmsbuild+%22gh-aw-workflow-id%3A+flaky-test-detector.agent%22&type=pullrequests) <!-- gh-aw-agentic-workflow: Flaky Test Triage, engine: copilot, version: 1.0.70, model: claude-sonnet-4.6, id: 30006270630, workflow_id: flaky-test-detector.agent, run: https://github.com/dotnet/msbuild/actions/runs/30006270630 --> <!-- gh-aw-workflow-id: flaky-test-detector.agent --> <!-- gh-aw-workflow-call-id: dotnet/msbuild/flaky-test-detector.agent --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <[email protected]>
The quarantine pipeline has not run since #14371. It fails while parsing YAML. Cause: `template:` paths resolve relative to the file that contains them. `quarantine.yml` is already in `azure-pipelines/`, so the extra prefix pointed to a folder that does not exist. Co-authored-by: Copilot App <[email protected]>
Problem
PRs that touch only
.github/**ordocumentation/**still run full multi-minute builds on everymsbuild-prleg. For example, on #14369 (two.github/workflows/*files) the legs ran: Windows Full 12m, Windows Core 9m46s, Linux Core 8m54s, Windows Full Release 6m42s — none of which exercise anything real for a docs/workflow change.Root cause
The
onlyDocChangeddetection (azure-pipelines/check-documentation-only-change.yml) already covers.github/and works correctly — it setonlyDocChanged=1for #14369. The problem is whatonlyDocChanged=1did:cibuild_bootstrapped_msbuild.sh/.ps1still run both build stages whenonlyDocChanged=1; they only drop--testand bootstrap creation.CI Buildsteps on Linux Core and macOS Core had nocondition— theeq(variables.onlyDocChanged, 0)line beneath them actually belonged to the coverage step — so they always did a full build.msbuild-quarantinehardcoded-onlyDocChanged 0and had no skip at all.Fix
Gate every heavy build step on
condition: eq(variables.onlyDocChanged, 0), matching the one leg that already did this, and remove the now-redundantcibuild.cmd without testfallback in the Windows Full Release leg. Apply the same inline skip to the threemsbuild-quarantinelegs.This reuses the existing inline
check-documentation-only-change.ymltemplate in each job — no new cross-job dependency, no added latency for normal PRs, no hardcoded container definitions or Arcade-internal edits. Doc/.github-only PRs now finish these legs in agent + checkout time.Note: the arcade
Source-Build (Managed)leg (~4 min) is intentionally left as-is. Gating it would require duplicating Arcade's default source-build platform/container definition in this repo (a drift/fragility risk), which isn't worth it for a ~4 min leg.Behavior for required checks
Jobs still run and report success; only their build/test steps are skipped, so required status checks stay green quickly rather than being left unreported.